Josh From BreakoutBros.com
Published © CC BY-NC

Use PocketC.H.I.P To Control Arduino Over Bluetooth

I will show you how to link your PocketCHIP to an Arduino using a HC-05 Bluetooth module.

IntermediateProtip1 hour2,492
Use PocketC.H.I.P To Control Arduino Over Bluetooth

Things used in this project

Hardware components

Pocket C.H.I.P.
Pocket C.H.I.P.
×1
Arduino UNO
Arduino UNO
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1

Software apps and online services

Linux Command Line
Arduino IDE
Arduino IDE

Story

Read more

Code

Setting up HC-05 with Arduino

C/C++
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // Use 10 for RX, 11 for TX 
 
void setup()
{
   Serial.begin(9600); //open up Serial communication and wait for information 
   while (!Serial) {
    }
 
   Serial.println("Ready!"); 
  
   mySerial.begin(38400); //Set the data rate for the HC-05 Configuration, when in AT mode (comment out next line)
   //mySerial.begin(9600);//Use the following line when communicating Arduino-CHIP (comment out previous line)
 
}
 
void loop() // this is what facilitates the communication
{
   if (mySerial.available())
   Serial.write(mySerial.read());
   if (Serial.available())
   mySerial.write(Serial.read());
}

Credits

Josh From BreakoutBros.com

Josh From BreakoutBros.com

14 projects • 88 followers
At BreakoutBros we try to be a link between electronics designers and hobbyists. We make electronics tinkering easy for everyone but teach professional methods.

Comments