light_rings question, accessing individual lights in a light ring

33 views
Skip to first unread message

driskel

unread,
Jul 1, 2018, 4:41:53 PM7/1/18
to MPF Users
When configuring a light ring, do you also configure the individual lights as well.

For discussion let's assume we are using a neopixel 12 led light ring with a fade candy board.  The board will be of address 0 and we will use 0-11 lights.

light_rings:
 
ring1:
   
number_start: 0
   
count: 12
   
radius: 3
   
start_angle: 90
   
center_x: 100
   
center_y: 50
   
debug: True
    number_template
: 0-{}

The use case, is I want to track shots via counter and increment the the number of LED's in the ring.

counters:  
    to_super_jets_1_counter
:
        count_events
: sw_pop_active
        direction
: down
        starting_count
: 11
        count_interval
: 1
        count_complete_value
: 0
        persist_state
: True
        events_when_complete
:
            super_jets_1_start
        events_when_hit
:
            countdown_to_superjets  

Another scenario, I would like to do, is address each individual light for light shows.  So in this case do I also define these are LED's.

Thanks.


jabdoa

unread,
Jul 2, 2018, 1:04:48 AM7/2/18
to MPF Users
It should automatically configure the lights in the ring as ring_light_0, ring_light_1 and so on. You can use the mpf monitor or mpf service cli to check the names. We probably should document this behavior as well.


Jan

driskel

unread,
Jul 2, 2018, 1:07:25 AM7/2/18
to MPF Users

Thank you for the response.  That would be a great documentation point.

driskel

unread,
Jul 2, 2018, 1:28:15 AM7/2/18
to MPF Users
Another question for you.  I am away from the hardware right now.

Is it implied that the light_rings are fadecandy or some other platform? I have 2 light systems in my machine (PD-LEDs and fadecandy). I am trying to use the fadecandy/neopixels for the light rings.

I was expecting to be able to use the platform variable like this.

light_rings:
    l_fc_ring1
:
        number_start
: 64
        number_template
: 0-{}

        count
: 12
        radius
: 3
        start_angle
: 90
        center_x
: 100
        center_y
: 50
        debug
: True

       
#platform: fadecandy
        tags
: alllights

driskel

unread,
Jul 2, 2018, 1:36:20 AM7/2/18
to MPF Users
My hardware in the /config/config.yaml

hardware:
    platform
: p3_roc
    driverboards
: pdb
    lights
: p3_roc, fadecandy
    rgb_dmd
: smartmatrixEnter code here...


jabdoa

unread,
Jul 2, 2018, 2:03:36 AM7/2/18
to MPF Users
That should be in the light_template setting. See the example here: http://docs.missionpinball.org/en/dev/config/light_rings.html.

Jan

driskel

unread,
Jul 2, 2018, 8:14:28 AM7/2/18
to MPF Users
Thank you.

I missed that in the documentation
Reply all
Reply to author
Forward
0 new messages