You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Wait for data to be available on the serial port
if (Serial.available() > 0) {
// Read the next character from the serial port
char c = Serial.read();
// If the character is '1', turn the LED on
if (c == '1') {
digitalWrite(ledPin, HIGH);
}
// If the character is '0', turn the LED off
else if (c == '0') {
digitalWrite(ledPin, LOW);
}
// Wait for a short period of time ( this will define the speed of data transfer) ( same for the python script to send file over the serial communication port)