Introduction: 16F877a & Bluetooth
This is my first play with the HC-05 Bluetooth device (and my first instructable !)
I programmed the PIC to receive and send data @ 9600 baud as this was the default settings of the HC-05.
Basically I connect to the bluetooth device and send data from my Android phone.
Sent text gets displayed on the LCD panel. Sending '#' then numbers 1 to 8 operates the associated relay.
When the relay is activated, the PIC sends either the number of the intended relay activated (1 to 8) or a letter, A to H (A = relay 1, B= relay 2 etc.)
This returned value is used to change the colour of the text on the button from red to green or green to red depending on the state of the relay.
Because there is no 'handshaking' I send each character with a 250ms delay to avoid overrun.
The PIC programme was written with the aid of Oshonsoft simulator (invaluable and inexpensive software) and the Android App was written using MIT App Inventor 2 - a completely different way of coding, but an excellent piece of software - and it's FREE !
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.