For a project that I am creating I want to set multiple variables to control a ledstrip via Serial.readString();
e.g.
int aStrip1AmountOn=5;
int bStrip2AmountOn=5;
int cStrip3AmountOn=5;
String incoming;
Now I want to read the serial via
incoming = Serial.readString();
Then I want to send a string over the serial from my computer for example: A10. This means that I want to set strip aStrip1AmountOn=10; and if I send C3 it sets cStrip3AmountOn=5 to three.
I don't exactly know how I can do this set this. I hope you understand what I mean and that someone can help me
It is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. Just use cstrings - char arrays terminated with 0.
Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.
And if you need more help please post your complete program.