Interfacing Ultrasonic Sensor HY-SRF05 with PIC Microcontroller is the fourth tutorial in a series of tutorials on Design Embedded System with PIC Microcontroller. In this tutorial we will measure the distance of an object using ultrasonic sensor and transmit it using Bluetooth.
In case you are new to PIC Microcontroller and MPLAB X IDE I strongly suggest to visit the tutorial – Getting started with MPLAB X IDE.
For interfacing Bluetooth with PIC Microcontroller we will require the following components which can be purchased in OpzLab web store. Links to the individual components are also provided.
- PICKIT3 Debugger / Programmer
- Mini Breadboard
- Power Supply
- HC-05 Bluetooth Modules
- HY-SRF05 Ultrasonic Sensor
- Jumper Wires
Follow the below tutorial to measure the distance of an object using ultrasonic sensor and transmit it using Bluetooth.
Start MPLAB X IDE, create a new project with the device settings as mentioned in the tutorial Interfacing LED with PIC Microcontroller.
After the project is created open MPLAB Code Configurator and proceed with the below settings.
Follow the tutorial Interfacing Bluetooth Module HC05 with PIC Microcontroller to setup UART module.