7 Segment Displays help

32 views
Skip to first unread message

Anthony Bates

unread,
Oct 24, 2025, 5:26:07 PMOct 24
to MPF Users
I'm currently working on retheming a Stern Nugent pin and I nearly have everything up and running to be able to dive deeper into writing the actual rules but I can't get my 7 segment displays to work. 

I am using LISY35 as the MPU and I have all of my coils, switches, and lamps mapped, and starting a test game, everything works great except the 7 segment displays. 

I tried referencing the section on the MPF website which says:
MPF can control all segment displays on your machine with LISY. Configure them like this:
segment_displays: info_display: number: 0 player1_display: number: 1 player2_display: number: 2 player3_display: number: 3 player4_display: number: 4
I've done this but it doesn't seem to be working. I've been through the main MPF tutorial as well as watched the video on segment displays but I still can't seem to get it working. 

Any help would be very appreciated as this seems to be my last hurdle in getting the software-hardware interface working. 

Thanks,
Anthony

Anthony Bates

unread,
Nov 7, 2025, 1:10:39 AMNov 7
to MPF Users
As a follow up, I did get the segment displays working but couldn't get the info display working properly. It seems LISY35 is coded to read it as a 4 digit display (even though it is actually 6) as the left digit is blank, the next 2 digits show the credits, the 4th digit is blank, and the right 2 digits show the ball number. My problem now is that no matter what I put in the code for the displays, the right 2 digit spaces always read 01. It seems there is an issue with MPF communicating with LISY due to it being set up as only a 4 digit display. If I could change this to identify it as a 6 digit display, I think that would solve my problem but I don't know how to do that. 
Here is my current segment display section of my main config.yaml:
  hardware:
    platform: lisy
  lisy:
    connection: serial
    port: com3
    baud: 115200
   
  segment_displays:
    info_display:    { number: 0, size: 4, update_method: replace }
    player1_display: { number: 1, size: 7, update_method: stack }
    player2_display: { number: 2, size: 7, update_method: stack }
    player3_display: { number: 3, size: 7, update_method: stack }
    player4_display: { number: 4, size: 7, update_method: stack }


  # Free Play: no {credits} anywhere in segment_display_player
  segment_display_player:
    # Light player score windows at game start
    game_started:
      info_display: { text: "    "}
      player1_display: { text: " " }
      player2_display: { text: " " }
      player3_display: { text: " " }
      player4_display: { text: " " }

    "ball_started{ball==1}": { info_display: { text: " 01 " } }
    "ball_started{ball==2}": { info_display: { text: " 02 " } }
    "ball_started{ball==3}": { info_display: { text: " 03 " } }

    # Show "0" the moment a player is added
    "player_added{num==1}":
      player1_display: { text: "0" }
    "player_added{num==2}":
      player2_display: { text: "0" }
    "player_added{num==3}":
      player3_display: { text: "0" }
    "player_added{num==4}":
      player4_display: { text: "0" }

    "ball_started{current_player.number==1}":
      player1_display: { text: "{players[0].score:d}" }
    "ball_started{current_player.number==2}":
      player2_display: { text: "{players[1].score:d}" }
    "ball_started{current_player.number==3}":
      player3_display: { text: "{players[2].score:d}" }
    "ball_started{current_player.number==4}":
      player4_display: { text: "{players[3].score:d}" }

    # turn mask ON (priority higher than your normal score text)
    "blink_on{current_player.number==1}":
      player1_display: { text: "       ", key: upmask, priority: 2000 }
    "blink_on{current_player.number==2}":
      player2_display: { text: "       ", key: upmask, priority: 2000 }
    "blink_on{current_player.number==3}":
      player3_display: { text: "       ", key: upmask, priority: 2000 }
    "blink_on{current_player.number==4}":
      player4_display: { text: "       ", key: upmask, priority: 2000 }

    # turn mask OFF (remove only our overlay)
    "blink_off{current_player.number==1}":
      player1_display: { action: remove, key: upmask }
    "blink_off{current_player.number==2}":
      player2_display: { action: remove, key: upmask }
    "blink_off{current_player.number==3}":
      player3_display: { action: remove, key: upmask }
    "blink_off{current_player.number==4}":
      player4_display: { action: remove, key: upmask }

    # safety: clear any leftover mask at the start of each ball
    ball_started:
      player1_display: { action: remove, key: upmask }
      player2_display: { action: remove, key: upmask }
      player3_display: { action: remove, key: upmask }
      player4_display: { action: remove, key: upmask }
     
    # Score updates
    "player_score{current_player.number==1}":
      player1_display: { text: "{players[0].score:d}" }
    "player_score{current_player.number==2}":
      player2_display: { text: "{players[1].score:d}" }
    "player_score{current_player.number==3}":
      player3_display: { text: "{players[2].score:d}" }
    "player_score{current_player.number==4}":
      player4_display: { text: "{players[3].score:d}" }

    # Back to blank at game end
    game_ended:
      player1_display: { text: "{machine.player1_score:d}" }
      player2_display: { text: "{machine.player2_score:d}" }
      player3_display: { text: "{machine.player3_score:d}" }
      player4_display: { text: "{machine.player4_score:d}" }
Reply all
Reply to author
Forward
0 new messages