Verildi

Arduino code to parse long string into array used for RGB LEDs

Hi,

I currently have another project where:

- I will have a web app sending strings to a Spark Core (running Arduino Code) through the Spark Core API;

- These strings are the information of the color each RGB LED should assume. I'll have 400 WS2812B LEDs set up in a matrix, or even more in the future;

- The web app runs a javascript code that sends a string through URL.

What I need is code to parse that string into bits of information. Each pixel is currently defined with a function:

[url removed, login to view](i, R, G, B); <- i is the number of the pixel in line (beginning in 0), R, G and B are the 0-255 values for each red, green and blue.

The string could be something like (x, R,G,B;x+1,R,G,B):

"0,255,255,50; 1,0,0,255; 2, 50,50,255; ..." <- The commas separate the values for the pixel number, red, green and blue values of each LED, the semi-colon separates the pieces of information for each

That string should be parsed and put into an array (2D array probably?) so that then I can put them into LED functions, with something like:

[url removed, login to view](0, array[0][0], array[0][1], array[0][2]);

[url removed, login to view](1, array[1][0], array[1][1], array[1][2]);

[url removed, login to view](2, array[2][0], array[2][1], array[2][2]);

I've attached a code I've used that has three functions - one for each of the RGB - where it receives from the web app the information of one of the RGB at a time, and then proceeds to define all of the LEDs with that color.

Please let me know if you're interest in working for this and what would be your budget. I'm looking forward to hearing from you.

Beceriler: Arduino

Daha fazlasını görün: arduino parse string array, up string, to string, string i, string b, set bits, m string, arduino f, spark app, rgb, parse a string, g-pixel, g-code, code arduino, Arduino, Arduino code, leds code, javascript colon, pixel string, javascript arduino, working string, strip url, arduino function, parse javascript, parse array

İşveren Hakkında:
( 5 değerlendirme ) Caparica, Portugal

Proje NO: #6514318

1 freelancer bu iş için ortalamada 25€ teklif veriyor

mynamejoe

Hired by the Employer

in 4 gün içinde25€ EUR
(2 Değerlendirme)
1.7