How To Connect

diagram
  1. Connect the Vcc of HC-05 Bluetooth Sensor to pin to VBUS of Raspberry Pi Pico
  2. Connect the TXD pin of HC-05 Bluetooth Sensor to GP0 pin of Raspberry Pi
  3. Connect the RXD pin of HC-05 Bluetooth Sensor to GP1 Raspberry Pi
  4. Connect the GND pin of HC-05 Bluetooth Sensor to GND pin of Raspberry Pi Pico
  5. Positive terminal of LED is connected to Resistor
  6. The other terminal of resistor connected to GP19 pin of Raspberry Pi Pico
  7. Negative terminal of LED is connected to GND pin of Raspberry Pi Pico
  8. Click the Bluetooth icon in the smartphone to turn on the Bluetooth
  9. Turn on the Bluetooth by clicking the switch given in the smartphone screen
  10. Select Raspberry Pi from the Available devices
  11. After completing the circuit and pairing the Bluetooth, user can Turn-On and Turn-Off the LED by clicking the button given in the smartphone

Connections Logs

    Raspberry Pi Pico
    HC-05
    Resistor
    LED
    Smart Phone

    CONNECTOR INFO
            
            from machine import Pin,UART
            uart = UART(0,9600)
            LedGPIO = 16
            led = Pin(LedGPIO, Pin.OUT)
            while True:
                if uart.any():
                    command = uart.readline()
                    # print(command)   # uncomment this line to see the received data
                    if command==b'\xd0':
                        led.high()
                        print("ON")
                    elif command==b'\xd5':
                        led.low()
                        print("OFF")