Replicating the REPL over an HC-05 Bluetooth connection on the PICO RP2040 #10534
freemansoft
started this conversation in
Show and tell
Replies: 1 comment
-
Failure is a learning experience too. It turns out my HC-05 was an HC-06 and that is the reason I couldn't get it into command mode as expected. https://joe.blog.freemansoft.com/2023/01/fail-my-old-hc-05-bluetooth-module-was.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It is only two lines of code to enable serial and the REPL over the HC-05 Bluetooth adapter. People have been doing this for a while but I wanted to capture the two lines of code required for the RP2040. This assumes an HC-05 at the default data rate on UART0
Bluetooth supports virtual serial ports in the same way USB devices can. Many cheap Bluetooth adapters device present themselves as virtual serial ports after a successful pairing. We can then open the virtual serial port just like any other to read and write data as if it was a physical connection.
The serial port can be used for streaming data or to run the REPL over the Bluetooth virtual serial port. I enable the REPL to do troubleshooting and tweaking which still leaves it available for data communication. The truly awesome RP2040 has two software UARTS in addition to the USB serial connection. We can connect either of these to a serial RX/TX Bluetooth adapter. That is simple as shown below.
Replicating the REPL across a Bluetooth Link Blog Article
Beta Was this translation helpful? Give feedback.
All reactions