working version?

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2023-11-19 22:45:17 +01:00
parent d79c4c3a20
commit 5fe0c22abb
4 changed files with 149 additions and 72 deletions

View File

@@ -1,5 +1,7 @@
#include <SoftRS485.h>
int count = 0;
void setup() {
Serial.begin(115200);
Serial.println("This is SendAndReceive 0.1");
@@ -8,11 +10,11 @@ void setup() {
// connect pin 3 to ^RE of Max485
// connect pin 4 to DE of Max485
// connect pin 5 to DI of Max485
while (send485("Hello World!")) {}
}
void loop() {
// put your main code here, to run repeatedly:
if (available485()) Serial.println("Received "+get485message());
delay(5000);
count++;
String s = "Test "+String(count);
send485(s.c_str());
}