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

Arduino controlled LCD using a shift register and the SPI library

Now that I got my recycled 40×2 character LCD working with Arduino, the next step is to get it to show something useful. I decided to add it to my Bluetooth Controlled robot and display data from its two ultrasonic distance sensors (initially). Gradually more interesting info like battery voltage and wheel encoder data can also be shown, as I get those components working. The problem is that now I need to find another 6 digital pins to control the LCD itself. Fortunately, there is an alternative: add a 74HC595 shift register and take advantage of the Arduino SPI library. Here is how: ...

December 20, 2013 · 12 min · 2479 words · Stan

Controlling a 40 x 2 character LCD with Arduino Uno and the LiquidCrystal Library

A couple of days ago I came across a discarded Meridian PBX phone and naturally, took it apart. Among some of the more promising salvaged components was a 40 x 2 character LCD. There was a ribbon cable attached to the LCD with a 14 pin female connector. The pins were helpfully labeled on the front of the panel (from 1 to 14). On the back of the LCD I could see five KS00065B LCD Driver chips. The next thing to find out was how to hook this up to my Arduino Uno. ...

November 22, 2013 · 8 min · 1616 words · Stan

How to program ATTiny85 with Arduino Uno (part 2)

This is the second part of the tutorial on how to program an AVR ATTiny85 chip with Arduino Uno. All the hard work has already been covered in Part 1, so make sure that you have completed the steps in that section before you continue! By default, the ATtiny85 runs at 1 MHz. You need to do an extra step to configure the microcontroller to run at 8 MHz. This is a requirement for using some popular libraries (like Software Serial), as well as to take full advantage of your chip. ...

August 31, 2013 · 2 min · 288 words · Stan

How to program ATTiny85 with Arduino Uno (part 1)

UPDATE, November, 2015: The article below was written for Arduino IDE versions, prior to 1.6.4. If you are currently using Arduino IDE 1.6.4, or later, follow the instructions in blog post instead. This tutorial is based on the steps I took to program an ATTiny85 with my Arduino Uno and use the nifty little chip for a small line following robot. The idea for using the ATTiny came from the MAKE magazine and more specifically their “How-To: Shrinkify Your Arduino Projects” YouTube video. The ATTiny libraries for the Arduino IDE come from the High-Low Tech group at the MIT Media Lab. They have some other interesting materials for Arduino on their site as well. Step 1: Collect all necessary hardware components An Arduino Uno (or compatible board) An ATTiny85 IC One 10 uF capacitor Breadboard and jumper wires ...

June 30, 2013 · 6 min · 1099 words · Stan

ATTiny Line Follower

Continuing to mess around with the ATTiny85 IC… I ported the code from my Arduino Uno line following robot to the ATTiny. Some changes were necessary to make it work: The ATTiny has only 3 analog pins, so the sensor array has 3 TCRT5000 IR LED/Sensors instead of the 6 the original line follower had The SoftwareServo library was needed, as the standard servo library that comes with the Arduino IDE does not work on the ATTiny The code used is below, and more info on how to program the ATTiny chip using your Arduino as a programmer is available in this post. There is one more pin available on the ATTiny85, so I am thinking of adding an ultrasound sensor and some basic obstacle avoidance next. Here is the Arduino Code that runs on the ATTiny: ...

June 10, 2013 · 2 min · 369 words · Stan

Free Course: Control of Mobile Robots

Coursera is a social entrepreneurship company that partners with the top universities in the world to offer courses online for anyone to take, for free. One of the courses included in 2013 is “Control of Mobile Robots” by Magnus Egerstedt, a Professor in the School of Electrical and Computer Engineering at the Georgia Institute of Technology. According to the course summary, you will learn how to make mobile robots move in effective, safe, and predictable ways, avoid collisions while reaching target locations, as well as dabble with robots that fly, or walk. Sounds pretty cool! The next session starts on January 28th, 2013… ...

December 18, 2012 · 1 min · 104 words · Stan

The very basic: Circuits

Circuits 1 – Khan Academy

November 18, 2012 · 1 min · 5 words · Wagner

Robot Platform including h-bridges from $10 R/C Car

This is an “instructable” on how to hack a cheap remote controlled toy car and turn it into an Arduino powered autonomous robot vehicle. It requires some soldering, so be prepared to mess around with wires on a tiny PCB and learn to de-solder a chip from a board! Once you master that though, you open endless possibilities for hacking and salvaging components from old “junk” electronics!

November 16, 2012 · 1 min · 67 words · Stan