RPi: Add support for RS485 transport
Remove serial print from MyTransportRS485.cpp to increase speed.
This commit is contained in:
@@ -27,8 +27,10 @@
|
||||
* Motion Sensor example using HC-SR501
|
||||
* http://www.mysensors.org/build/motion
|
||||
*
|
||||
* The transport uses AltSoftSerial to handle two serial links
|
||||
* on one Arduino. Use the following pins for RS485 link
|
||||
* If your Arduino board has additional serial ports
|
||||
* you can use to connect the RS485 module.
|
||||
* Otherwise, the transport uses AltSoftSerial to handle two serial
|
||||
* links on one Arduino. Use the following pins for RS485 link
|
||||
*
|
||||
* Board Transmit Receive PWM Unusable
|
||||
* ----- -------- ------- ------------
|
||||
@@ -43,6 +45,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// Enable debug prints to serial monitor
|
||||
#define MY_DEBUG
|
||||
|
||||
// Enable RS485 transport layer
|
||||
#define MY_RS485
|
||||
@@ -53,6 +57,9 @@
|
||||
// Set RS485 baud rate to use
|
||||
#define MY_RS485_BAUD_RATE 9600
|
||||
|
||||
// Enable this if RS485 is connected to a hardware serial port
|
||||
//#define MY_RS485_HWSERIAL Serial1
|
||||
|
||||
#include <MySensors.h>
|
||||
|
||||
unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
|
||||
|
||||
Reference in New Issue
Block a user