working version?
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user