I am pretty noob when it comes to arduino to computer communication. Recently, though, I've been trying out some new things, such as reading some Strings built-in examples, and wanted to try out myself.
But there's the problem : I don't know how.
I just wanted to a simple test : write "run blink demo" in the serial monitor, arduino would recognise it and would run the blink sequence 10 times.
I have this so far :
int index[16];
String blinkDemo = "run blink demo";
int x = 0;
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600);
}
void loop() {
while (Serial.available() > 0) {
index[x] = Serial.read();
x += 1;
}
}
I don't know how to procced or even if I need Strings on this! Can somebody please help me?