Adding Bluetooth to Pico - HC-05 tutorial - C/C++
HTML-код
- Опубликовано: 16 мар 2021
- Wireless debugging or logging is sometimes necessary, and that is where using an HC-05 Bluetooth module comes in handy. In this video, we'll look at how to use the HC-05 Bluetooth module with a Raspberry Pi Pico
Github: github.com/TurtleGameDev/Pico... - Наука
Feel free to leave any questions you have in the comments
Can Pico receive voice data via HC -05?
I would love to see code and a demo of two Pico's communicating with the HC-05 rather than a computer.
Adding bluetooth serial with the hc-05 is relatively easy once you get things set up. Thank you. Got it working between the pico and Linux.
I really enjoyed the video! I have no experience using Pis but am looking into using a Pico with a Bluetooth module for a personal project I have coming up! I look forward to seeing your new videos!
Glad it was helpful!
If you connect HC-05 Vcc to VSYS rather than V3.3 then it will be fed ~5V when the pico is connected to USB. There is no need to hack the hardware for this to work as designed.
That's a good point, as long as you are powering it through the USB port VSYS will be connected to the 5 volts off the USB
Sorry if this is obvious, but can these BLE modules transmit and receive? So for example, can I have two of these set up with one sending instructions to the other?
They can indeed. Your best bet for figuring this out is to look up how to do it with arduinos and then porting that to raspberry pi picos
Just a little query:
Can I use this code on Arduino IDE 2.0 on my Pico directly?
Mind you, I have a BLE 4.0 module (AT-09).
if you even know how to do this in MicroPython, it will be helpful too coz I'm a very beginner in all this stuff, like, the Pico was my first ever microcontroller!
I am fairly sure that as of now, you can not use the arduino ide. I've heard rumors that the arduino ide will support it soon, but imo, I would very much recommend setting up vs code if you want to use c/cpp. It is a much better environment than the arduino ide
I unfortunately do not know micropython
@@kleistrobotics2220 Yeah! You are right. I tried the Arduino IDE but it didn't connect...forever!
Wait, there is a VS code extension for the Pico SDK?
It's the standard C/C++ Extension Pack. With the Pico SDK included in your project correctly, IntelliSense will work. It's definitely useful
My device is not being found on iPhone android or my windows PC. Can someone please help with troubleshooting.
Did you ever figure it out
Can you also connect this to an Android phone? My goal is to connect a Pico to my phone, then add buttons to the pico's breadboard that when pressed, will trigger an app/shortcut on my phone.
It is possible to connect it to a phone, but probably not like you want. Your best bet is to look into how you would do it with an arduino then adapt that to a pico
@@kleistrobotics2220 awesome, thank you
So we have to power the BLE module separately?
You would have to, at least with the modules I bought. There might be 3.3 volt vcc hc-05 modules out there. But with one that requires 5 volt to power, you do need an external power source
Oof, that's great! Could you similarly introduce WiFi capabilities to the pico in a simple manner?
It should actually be pretty simple. create.arduino.cc/projecthub/imjeffparedes/add-wifi-to-arduino-uno-663b9e The link leads to an arduino tutorial for adding wifi. It uses the same communication protocol as the bluetooth module, so the code should actually be pretty simple. There are modules for all sorts of communication standards that should be easy to set up with the pico, I'm considering using a radio transmitter for a future project instead of a bluetooth module.
@@kleistrobotics2220 wow that’s so neat! And yeah a radio-transmitter module would be so cool! Thanks a lot
What about data receiving?
It's a little more complicated then sending, but still pretty simple. github.com/raspberrypi/pico-examples/blob/master/uart/uart_advanced/uart_advanced.c This link leads to an example from the official Raspberry Pi github. It shows how to use interrupts to receive data over UART.