Hi all! Tell me how to get split data from the slider movement in the serial port monitor? Thank you
#include <SoftwareSerial.h>
String R = " ";
int T;
int T2;
SoftwareSerial mySerialBT(10,9);
void setup() {
Serial.begin(9600);
mySerialBT.begin(9600);
}
void loop() {
if (mySerialBT.available() == 1) {
R = mySerialBT.readString();
delay(200);
Serial.println(R);
if (R == "A") {
pinMode(12, OUTPUT);
digitalWrite(12, 1);
} else if (R == "B") {
pinMode(12, OUTPUT);
digitalWrite(12, 0);
}
}
}