Hello Tim
You don't really need any code to use the HC-06. Once you configure the HC-06 baud rate you just connect to a com port and use Print and Input commands. I use a bluetooth terminal programon my phone to control projects that have bluetooth. If you are trying to connect two micro controllers using bluetooth I don't think the HC-06 can do that but I've read that the HC-05 can.
Here are my notes to configure the HC-06:
I like realterm to send config commands.
Code:
'BlueTooth Config Notes: ' TYPE - HC-06 ' DEFAULT BAUD - 9600 ' DEFAULT NAME - ' DEFAULT PIN - 1234 ' NEW BAUD - 115200 ' NEW NAME - clock ' NEW PIN - time ' 'To enable command mode install jumper C next to module. 'Jumper C pulls the EN line high. 'Setup Commands for this project. 'send return 'AT - OK 'AT+NAMEclock - OKsetname 'AT+PINtime - OKsetPIN or sometimes no return but pin change works anyway. 'AT+BAUD8 - OK115200 ' 'Other commands. 'send return 'AT+BAUD4 - OK9600 'AT+BAUD5 - OK19200 'AT+BAUD6 - OK38400 'AT+BAUD7 - OK57600 'AT+BAUD8 - OK115200 'AT+BAUD9 - OK230400 'AT+BAUDA - OK460800 'AT+BAUDB - OK921600 'AT+BAUDC - OK1382400
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum