My code:
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
Serial1.write("AT+DTTX\n");
delay(5000);
while (Serial1.available()) {
String txtMsg = Serial1.readString();
Serial.println(txtMsg);
}
}
Serial monitor:
1
AT+DTTX OK
Radio Tx Done RadioTxDelayDone Radio Rx Done Len:2 RSSI:-93 SNR:33
2
AT+DTTX OK
Radio Tx Done RadioTxDelayDone Radio Rx Done Len:2 RSSI:-90 SNR:32
3 AT+DTTX OK
Radio Tx Done RadioTxDelayDone Radio Rx Done Len:2 RSSI:-92 SNR:22
How to get RSSI and SNR from Serial monitor?
I want results like:
1 RSSI:-93 SNR:33
2 RSSI:-90 SNR:32
3 RSSI:-92 SNR:22