this does *not* work

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2023-11-13 00:08:21 +01:00
parent 78c1f77b87
commit add1624f97
4 changed files with 178 additions and 81 deletions

View File

@@ -2,17 +2,17 @@
void setup() {
Serial.begin(115200);
init485(2,3,4,5);
speed485(8000);
boolean sent = false;
while (!sent) {
sent = send485("This message is sent and received!");
}
Serial.println("This is SendAndReceive 0.1");
init485(2,3,4,5); // library initialization:
// connect pin 2 to RO of Max485
// 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());
}
if (available485()) Serial.println("Received "+get485message());
}