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...
  • НаукаНаука

Комментарии • 28

  • @kleistrobotics2220
    @kleistrobotics2220  3 года назад +3

    Feel free to leave any questions you have in the comments

    • @Max_Bio
      @Max_Bio 20 дней назад

      Can Pico receive voice data via HC -05?

  • @mytechnotalent
    @mytechnotalent 2 года назад +2

    I would love to see code and a demo of two Pico's communicating with the HC-05 rather than a computer.

  • @HighfireX
    @HighfireX 2 года назад

    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.

  • @bojanglescontenthub8373
    @bojanglescontenthub8373 3 года назад

    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!

  • @DonTheBrit
    @DonTheBrit 2 года назад +1

    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.

    • @kleistrobotics2220
      @kleistrobotics2220  2 года назад

      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

  • @NoahNobody
    @NoahNobody 3 года назад

    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?

    • @kleistrobotics2220
      @kleistrobotics2220  3 года назад +1

      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

  • @prafultimbadiya9891
    @prafultimbadiya9891 3 года назад

    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!

    • @kleistrobotics2220
      @kleistrobotics2220  3 года назад

      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

    • @kleistrobotics2220
      @kleistrobotics2220  3 года назад

      I unfortunately do not know micropython

    • @prafultimbadiya9891
      @prafultimbadiya9891 3 года назад

      @@kleistrobotics2220 Yeah! You are right. I tried the Arduino IDE but it didn't connect...forever!

  • @lillythefox21283
    @lillythefox21283 Год назад

    Wait, there is a VS code extension for the Pico SDK?

    • @kleistrobotics2220
      @kleistrobotics2220  Год назад

      It's the standard C/C++ Extension Pack. With the Pico SDK included in your project correctly, IntelliSense will work. It's definitely useful

  • @rafaelzasas9421
    @rafaelzasas9421 2 года назад

    My device is not being found on iPhone android or my windows PC. Can someone please help with troubleshooting.

  • @NormanDurkee
    @NormanDurkee 3 года назад

    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.

    • @kleistrobotics2220
      @kleistrobotics2220  3 года назад +1

      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

    • @NormanDurkee
      @NormanDurkee 3 года назад

      @@kleistrobotics2220 awesome, thank you

  • @NoahNobody
    @NoahNobody 3 года назад

    So we have to power the BLE module separately?

    • @kleistrobotics2220
      @kleistrobotics2220  3 года назад

      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

  • @Darkev77
    @Darkev77 3 года назад

    Oof, that's great! Could you similarly introduce WiFi capabilities to the pico in a simple manner?

    • @kleistrobotics2220
      @kleistrobotics2220  3 года назад +1

      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.

    • @Darkev77
      @Darkev77 3 года назад

      @@kleistrobotics2220 wow that’s so neat! And yeah a radio-transmitter module would be so cool! Thanks a lot

  • @pramukhshatabdikirtanmalar6637
    @pramukhshatabdikirtanmalar6637 3 года назад +1

    What about data receiving?

    • @kleistrobotics2220
      @kleistrobotics2220  3 года назад

      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.