Using Serial, transfering string or int to Arduino

#1

Hello everyone!

Boy, I learned from my stupidity. I'm still having trouble though, and it's baffling me to some degree.
Trying to send a simple "15:47" over a serial node to my Arduino. It says connected and everything, as the picture will show:

On the recieving end I have the following code:
#define LIGHT 2
void setup() {
// put your setup code here, to run once:
Serial.begin(11520);
String Sundown;
}

void loop() {
// put your main code here, to run repeatedly:

String Sundown = Serial.readString()

digitalWrite (LIGHT, LOW);
if (Sundown = "15:47");
digitalWrite (LIGHT, HIGH);

Any ideas, ladies and gentlemen? I know this is only partly Node-Red, but I happen to know we have some brilliant Arduino people out there! Am I using the wrong Serial (the rate is 11520 for both Serial and Arduino)

Flow info attatched in file. ;The Flow.txt (3.2 KB)

0 Likes