LED color assignment in mode

33 views
Skip to first unread message

Mark

unread,
Dec 14, 2021, 7:12:54 PM12/14/21
to MPF Users
Would someone be kind enough to point out how/where to assign color to an LED in a mode?  Right now they just go white when hit.  I'm sure it says it somewhere in the tutorial, but I can't find it.  Thanks!

#config_version=5

mode:
  start_events: ball_starting

shots:
  mal_m:
    switch: s_mal_m
    profile: mal_profile
    show_tokens:
      led: l_led_mal_m
  
  mal_a:
    switch: s_mal_a
    profile: mal_profile
    show_tokens:
      led: l_led_mal_a
  
  mal_l:
    switch: s_mal_l
    profile: mal_profile
    show_tokens:
      led: l_led_mal_l
   


shot_groups:
  mal_group:
    shots: mal_m, mal_a, mal_l
    reset_events: mal_group_hit_complete

shot_profiles:
  mal_profile:
    states:
      - name: off
        show: off
      - name: hit
        show: on

variable_player:
  mal_group_hit_complete:
    score: 10000

Avery Tummons

unread,
Dec 14, 2021, 10:18:11 PM12/14/21
to mpf-...@googlegroups.com
You can define your own shows that you reuse, or you can use the built in shows. There is a default called led_color that lets you pass in two show tokens (led) and (color).

So I’m your shots add an additional show_token for color:  you can type a name, like yellow, hex or RGB values.

Then in shot_profiles: change your show from on to led_color. Then you should get the result you’re looking for.

Sent from my iPhone

On Dec 14, 2021, at 6:12 PM, Mark <gunsling...@gmail.com> wrote:

Would someone be kind enough to point out how/where to assign color to an LED in a mode?  Right now they just go white when hit.  I'm sure it says it somewhere in the tutorial, but I can't find it.  Thanks!
--
You received this message because you are subscribed to the Google Groups "MPF Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpf-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpf-users/817fafda-e436-47f2-9d64-8524499fc016n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages