Hi all.
I have a arduino project, with serial comminication toward my PC.
When I send a serial command from my computer, I send data like values for setpoints etc. like:
A setpoint for light, "k1: 255," or turn on/of things.
There's manny different values given from PC. So I split the values and replace the space between "k1: 255," so its like this "k1:255,".
In VB.net i then use "left() and len()" function to then choose next things to do.
I have:
k - setpoints, 0-100%, or setpoints for sensors
w - setpoint on/off
t - timers
So when I read the first letter in the array, I deside if its a k, w or t.
Then I use the hole array to set a textbox.
So my question regarding C is:
I wanna do similar in "C". I want to get my serial data, and place the "data" right place.
Like, I send a 0-255 value from computer, "k1: 244,", I retrieve this in "arduino" and I want to give a light brightness. analogWrite(ledPin10, brightness);
So I need to split my input, (k1: 244,) and store value so I could get it later in program.
Annyone?
-Andy