DIY Projects Lab
Published © CC BY-SA

HC-05 Bluetooth With Raspberry Pi Pico Using Micropython

This guide covers how to use the HC-05 Bluetooth module with a Raspberry Pi Pico board using MicroPython. The HC-05 is a Bluetooth module.

BeginnerFull instructions provided1 hour997
HC-05 Bluetooth With Raspberry Pi Pico Using Micropython

Things used in this project

Hardware components

Raspberry Pi Pico
Raspberry Pi Pico
×1
LED (generic)
LED (generic)
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Arduino Nano R3
Arduino Nano R3
×1

Software apps and online services

thonny

Story

Read more

Schematics

Schematics

Code

Code

MicroPython
#Diyprojectslab.com
 
from machine import Pin, UART
 
uart = UART(0, 9600)
led = Pin(13, Pin.OUT)
 
while True:
  if uart.any() > 0:
    data = uart.read()
    print(data)
    if "on" in data:
      led.value(1)
      print('LED on \n')
      uart.write('LED on \n')
    elif "off" in data:
      led.value(0)
      print('LED off \n')
      uart.write('LED off \n')

Credits

DIY Projects Lab

DIY Projects Lab

40 projects • 112 followers
I am a DIY hobbyist by passion and Electronics Engineer by profession.

Comments