Interfacing Ultrasonic Sensor HY-SRF05with 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.
Interfacing Bluetooth with PIC Microcontroller is the third tutorial in a series of tutorials on Design Embedded System with PIC Microcontroller. In this tutorial we will control two DC Motors and a buzzer connected to the PIC microcontroller from our android phone via bluetooth.
Search for the paired HC-05 device and connect. The red light on the Bluetooth module will now blink less frequently. A serial communication link has been now established between your android phone and the PIC microcontroller.
Send the below commands to interact with the motors and buzzer.
You can also configure buttons in the android app to control the motors and the buzzer. Good Luck!
Hit the Download button to program and run the device from MPLAB X IDE. The pic microcontroller will be programmed after few seconds, the program will run the dc motors in forward, reverse, left and right directions per 10 seconds each.