Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SoftwareSerial.h>
- SoftwareSerial RS485Serial(2, 3); // RX, TX
- void setup() {
- pinMode(4, OUTPUT); // Control the DE/RE pin
- digitalWrite(4, HIGH); // Set to transmit mode
- RS485Serial.begin(9600);
- }
- void loop() {
- RS485Serial.println("Hello from Arduino!");
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement