hc-05 atmode set

Dependencies:   mbed

Prerequisite

HC-05 Bluetooth ATmode setting


BlueTooth Configuration

Serial Command

/media/uploads/joon874/bluetooth--.png

at
at+name=
at+pswd=
at+reset

Hardware Configuration

WIZwiki-W7500 Pin map

pin map


Software

none

Caution

main.cpp

Committer:
joon874
Date:
2017-04-18
Revision:
1:0122c3d1e431
Parent:
0:55488a36f1c4

File content as of revision 1:0122c3d1e431:

/************
    AT MODE
**************/
/**************

 Module : HC-05
 
***********/

#include "mbed.h"

Serial pc(USBTX, USBRX);
Serial bt(D1,D0);

int main(void)
{   
    pc.baud(9600);  
    bt.baud(38400);
    
    pc.printf("WIZwiki-W7500\n\r");
    pc.printf("HC-05 SET\n\r");
    
    char ch;
    
    while(1)
    {
        if(pc.readable())
        {
            ch = pc.getc();
            bt.putc(ch);
        }
        
        if(bt.readable())
        {
            ch = bt.getc();
            pc.putc(ch);
        }    
    }
}