fixed comment in Sender.ino

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2023-12-08 13:24:46 +01:00
parent 9f0513426d
commit e04a2bc202
2 changed files with 6 additions and 134 deletions

View File

@@ -1,8 +1,9 @@
/*
* Demonstrates how to use LCDisplay in conjunction with SoftRS485:
* Demonstrates how to use Read Buttons in conjunction with SoftRS485:
*
* The main _loop_ of this program listens on the RS485 bus.
* Whenever a message is received from the bus, it is displayed on the LCD.
* If a button is pressed, a corresponding flag is set.
* The main loop checks for the state of those flags and
* sends a message on the RS485 bus whenever a flag is set.
*/
// include the library code:
@@ -31,7 +32,7 @@ unsigned long times[8];
void setup() {
void setup(){
Serial.begin(115200);
init485(Max485_RO,Max485_RE,Max485_DE,Max485_DI); // library initialization:
pinMode(BTN_INT,INPUT_PULLUP);
@@ -73,7 +74,7 @@ void isr(){
#ifdef SEND_485
void send(int btn){
String s = "{nano:"+String(ID)+",btn:"+String(btn)+"}";
for (int i = 0; i<10; i++){
for (int i = 0; i<10; i++){
if (send485(s.c_str())) break;
Serial.println("collision detected, trying again:");
}