Skip to content

Commit

Permalink
Update RS485 examples to use 8N2 option as well
Browse files Browse the repository at this point in the history
  • Loading branch information
madleech committed May 6, 2015
1 parent cb01482 commit c6b8c6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/rs485_cmri_hello_world/rs485_cmri_hello_world.ino
Expand Up @@ -19,7 +19,7 @@ Auto485 bus(2); // Arduino pin 2 -> MAX485 DE and RE pins
CMRI cmri(0, 24, 48, bus); // sets up an SMINI with address 0. SMINI = 24 inputs, 48 outputs

void setup() {
bus.begin(9600); // open the RS485 bus at 9600bps
bus.begin(9600, SERIAL_8N2); // open the RS485 bus at 9600bps
pinMode(12, INPUT); digitalWrite(12, HIGH);
pinMode(13, OUTPUT);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/rs485_rx_and_tx/rs485_rx_and_tx.ino
Expand Up @@ -10,7 +10,7 @@ Auto485 bus(DE_PIN); // Arduino pin 2 -> MAX485 DE and RE pins
CMRI cmri(CMRI_ADDR, 24, 48, bus); // defaults to a SMINI with address 0. SMINI = 24 inputs, 48 outputs

void setup() {
bus.begin(9600); // open RS485 bus at 9600bps
bus.begin(9600, SERIAL_8N2); // open RS485 bus at 9600bps
pinMode(LED_PIN, OUTPUT);
}

Expand All @@ -24,4 +24,4 @@ void loop() {
// 3: update input. Flips a bit back and forth every second or so
cmri.set_bit(0, (millis() / 1000) % 2 == 0);
}


0 comments on commit c6b8c6e

Please sign in to comment.