LED position change...
 
Notifications
Clear all

LED position change with rotary

3 Posts
3 Users
0 Likes
225 Views
 Phil
(@espo100583)
New Member
Joined: 4 months ago
Posts: 1
Topic starter  

Hi,

I've got a wheel with a 12 position rotary that has an LED for each position. I'm using it as an encoder so no position information from it.

So I have LED's 1-12 set to red with a static effect.

I then want to have light 1 to be White to corrispond to the encoder position, then with each click / button press, the next led turns white and the previous one goes back to red.

I've tried with an Ncalc formula and nearest I got setting it to white for a delayed time.

I have been playing with Javascript and got to a point I can cycle through 1-12 with the encoder clicks and output a counter, but it then goes to null. I'm very rusty on coding, havn't done it for years so appreciate any help you can offer.

I'm also not sure how I apply that output from the JS to the LED. In my head I'm thinking the output would corrispond to the LED start position but could be way off the mark.

Thanks


   
Quote
(@darox)
New Member
Joined: 3 months ago
Posts: 1
 

I am looking to do the same thing, so any help would be greatly appreciated.


   
ReplyQuote
(@sirius13)
Active Member
Joined: 7 months ago
Posts: 7
 

I'm also not sure how I apply that output from the JS to the LED. In my head I'm thinking the output would corrispond to the LED start position but could be way off the mark.


   
ReplyQuote
Share: