Connecting Arduino Uno and the JY-MCU Bluetooth module using SoftwareSerial

My previous post covers the basics of setting up a Bluetooth connection between an Arduino Uno and an Android phone using the JY-MCU Bluetooth module. We connected the JY-MCU Bluetooth module to the Arduino via a serial connection on (digital) pins 0 (rx) and 1 (tx). This uses Arduino’s built in hardware support for serial communication (via something called UART) and requires no additional libraries. The Arduino has a 64 byte serial buffer and can receive and store data in it, while executing other tasks in your program. For some great examples of using serial communication, as well as wealth of other Arduino related info see Nick Gammon’s web-site. There are a couple of downsides of this set-up for Bluetooth connectivity: ...

December 31, 2013 · 6 min · 1219 words · Stan

How to connect an Arduino Uno to an Android phone via Bluetooth

The purpose of this tutorial is to cover the basics of setting up a connection between Arduino Uno and an Android phone via Bluetooth. Smart phones pack a ton of cool features (camera, accelerators, speakers, microphone, a nice screen to show data from your sensors, wi-fi adaptor…) that will make an excellent addition to a robot, or any other Arduino project. I will use Blueterm a basic free Android terminal emulator app to send a single digit (zero or one) from a phone to a BlueTooth module connected to the Arduino Uno via a serial connection. The Arduino Uno will read the data and will turn an LED on, or off accordingly. After that it will send a status message back, which will be displayed on the phone’s screen. This will essentially confirm we have a two way communication between the Arduino and the Android phone over Bluetooth. The same approach can be used to interact with anything connected to your Arduino (like motors, servos and sensors) or the cool goodies in your smartphone (camera, accelerometer etc.). So let’s get stared! ...

December 27, 2013 · 21 min · 4294 words · Stan