You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
418 B
20 lines
418 B
#include <SoftRS485.h> |
|
|
|
int count = 0; |
|
|
|
void setup() { |
|
Serial.begin(115200); |
|
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 |
|
} |
|
|
|
void loop() { |
|
delay(5000); |
|
count++; |
|
String s = "Test "+String(count); |
|
send485(s.c_str()); |
|
}
|
|
|