voroshkov / Chorus-RF-Laptimer

MIT License
185 stars 54 forks source link

Feature: Arduino will automatically detect and configure the Bluetooth module's baud rate. #47

Closed kb9nate closed 5 years ago

kb9nate commented 7 years ago

Added code during "setup" to detect if the Bluetooth baud rate is not configured for 115200, if it is not then the serial interface is restarted at 9600 baud and command is sent to the Bluetooth module to reconfigure for 115200. Then the serial port is restarted at 115200.

This eliminates the need to pre-configure the Bluetooth module before assembly.

Code has been tested and works great.

voroshkov commented 7 years ago

Cool feature, great idea! Thanks. Can you confirm it works fine with several nodes attached to each other?

anunique commented 7 years ago

and if you dont want to run @ 9600 baud?

kb9nate commented 7 years ago

I will have to try it with multiple nodes, right now I only have enough parts to build two of them but will eventually be ordering some more. I suspect it could be made to work with multiple nodes by playing around with the timing a little bit. Or possibly just enable the baud rate changing code for the first node and then disable it for the remaining nodes.