123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|689|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Web Development -> Node.js + Raspberry pi + 25 RGB Leds

Wed, 13 Jan 2016, 02:54
waroffice
morning,

it has been a long time since I ventured in to this type of coding and have hit a brick wall. Posting in here because JS is I guess a web technology.

I have a raspberry pi controlling 25 individually addressable RGB LEDs, works a treat. I just can't animate for toffee!

I would like the lights to scroll a sort of colour hue table but I suck and cannot figure it out.

this is what I have so far, it just changes colour once every 0.5 seconds, I have snipped a bit to make it easier to read.

The socket.io stuff just receives a message from the web interface and starts the interval timer which calls the function after updating a "frame" number, it sucks. I need help in animations of this kind.


Wed, 13 Jan 2016, 03:20
Jayenkai
Not sure exactly what your issue is, but here's a nice colour bar! Hope it helps

(BlitzMax)


-=-=-
''Load, Next List!''
Wed, 13 Jan 2016, 03:47
waroffice
my issue is the maths to get a nice sine wave gradient and you seem to have given that

I need to translate to js and try it later, forgot to turn on my pi when I left for work.
Wed, 13 Jan 2016, 07:31
waroffice
for reference:

github.com/doghousedean/raspberry-pi-lighting
Wed, 13 Jan 2016, 08:50
waroffice
I adjusted it a little Jay to not do the *4 and it works a treat, will video it and upload it later
Wed, 13 Jan 2016, 10:04
Jayenkai
Kewly

And the *4 was mostly so's the whole 360 degrees fitted in the window

-=-=-
''Load, Next List!''
Thu, 14 Jan 2016, 09:42
waroffice
I tinkered with the timings etc after this vid.
https://youtu.be/uM1luZU9eAE
Thu, 14 Jan 2016, 10:10
Jayenkai
That's SO cool
Thu, 14 Jan 2016, 11:11
waroffice
#sarcasm
Thu, 14 Jan 2016, 11:20
Dabz
Waroffice be like:-





Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Thu, 14 Jan 2016, 11:36
Jayenkai
No sarcasm here, you've made a colour changing, computer controlled light array!!
Win!!!

-=-=-
''Load, Next List!''