Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SoftwareSerial.h>
- SoftwareSerial hc06(2,3);
- void setup(){
- //Initialize Serial Monitor
- Serial.begin(9600);
- Serial.println("ENTER AT Commands:");
- //Initialize Bluetooth Serial Port
- hc06.begin(9600);
- }
- void loop(){
- //Write data from HC06 to Serial Monitor
- if (hc06.available()){
- Serial.write(hc06.read());
- }
- //Write from Serial Monitor to HC06
- if (Serial.available()){
- hc06.write(Serial.read());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement