Blind Assistive Technology (BAT) Sleeve Part 4: Programming

Tuesday, June 11, 2013

Now it is time to program the BAT Sleeve. I will be giving you the actual source code to use which will be free to modify all that you wish. But before we do that, we need to have some software to actually compile the source code and transfer the program to the Arduino. To do that, go here.

This is where we will download the Arduino Integrated Development Environment, or IDE for short.  If you scroll down just a bit, you will see download links. Download the one made for the operating system that you are currently running on your computer. While you are there, look around a bit! There are amazing resources and project ideas on that site for the student who is willing to take the time to look.

Go ahead and install the Arduino IDE now that you have downloaded it. If you need further directions on the installation process, you can find them here, under the heading 'Installation'.

I am going forward with the assumption that you have installed the Arduino IDE. If you have not installed the IDE, you will not be able to complete the following instructions.

Download the source code for the Bat Sleeve. You can find it here.

Open up the ZIP file and extract it to your computer. Make a note of where you extracted it to.

Open up the batsleeve.ino file with the Arduino IDE.

Look for the line near the top which looks like this: #include "C:\batsleeve\pitches.h"

Edit that line so that it reflects where you extracted the source code to. For instance, if you are on Linux and you extacted the source code to '/home/mike/batsleeve', edit that one line so it reads as follows:

#include "/home/mike/batsleeve/pitches.h"

Now that everything is pointing to the right place, we can program the Arduino. Plug the USB cable into the Arduino, and the other end into your computer. Now in the Arduino IDE, select 'File', then select 'Upload'. The IDE will now compile the source code and upload it to the Arduino.

Assuming everything went well, you should hear a tone when you place your hand in front of the sensor. If you move your hand away, the tone should lower in pitch. If you move your hand closer, it should increase in pitch. If something is in fingertip distance, you should hear constant pulses of sound. If something suddenly breaks in front of your hand, you should hear a brief beep.

You can now unplug the USB cable. The Arduino will store the program using the magic of science. If you want, you can now plug in the battery pack to take the electronics mobile.

Next time: Building the actual sleeve!


Post a Comment