Skip to content

Commit 385b068

Browse files
committed
Set the serial port speed of the Serial Gateway to 38400 on Arduino's running on 8MHz oscillator
On 8 MHz clock speed the actual 115200 bps rate is so much off that sending data over serial is very unreliable.
1 parent 528e09d commit 385b068

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libraries/MySensors/examples/GatewaySerial/GatewaySerial.ino

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
// Enable serial gateway
5252
#define MY_GATEWAY_SERIAL
5353

54+
// Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
55+
#if F_CPU == 8000000L
56+
#define MY_BAUD_RATE 38400
57+
#endif
58+
5459
// Flash leds on rx/tx/err
5560
#define MY_LEDS_BLINKING_FEATURE
5661
// Set blinking period

0 commit comments

Comments
 (0)