#loop array cycle on trigger event
1 messages · Page 1 of 1 (latest)
You reaaaally need to explain more. What coordinates ? What do you want to do with them? Where do you want them to go or be stored? Pull one out?
Ok I try it 🙂
- The task: define array with about 10 elements (one element is x,y value pair) store in inject node???
- In trigger action (next or previous ) pull next or previous element from
array and construct {"color": {"x": x_value, "y": y_value}} payload data - Send this data to light bulb
- after last element on next trigger event array index go to first and pull it
- after first element previous trigger event array index go to last and pull it (cycling in array)
trigger even come from switch node legs 6 and 7