3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Bats Have Feelings Too

Step 9Load Software to Lilypad

Load Software to Lilypad
«
  • Upload.jpg
  • Picture 5.png
Using your USB cable and USB link attach the Bats LilyPad to your computer.
Using Arduino software write the program so the Maxbotix will drive the vibe board.

I used the following program:

//Bats Have Feelings Too
//Wearable computer system to assist the visually handicapped
//Lynne Bruning November 2008

//output
int BUZZER_OUTPUT_PIN=13;

//intput
int RANGE_FINDER_INPUT_PIN=0;
int NUMBER_OF_UNITS_TO_SENSOR=42;
//change units to match your specific user and environment

void setup()
{
pinMode(RANGE_FINDER_INPUT_PIN,INPUT); //sets the range finder analog pin as input
pinMode(BUZZER_OUTPUT_PIN, OUTPUT); // sets the buzzer digital pin as output
digitalWrite(RANGE_FINDER_INPUT_PIN, LOW); // turns the buzzer off
digitalWrite(RANGE_FINDER_INPUT_PIN, HIGH); // turns the buzzer on

beginSerial(9600);
Serial.println("units");
}
void loop()
{
int val = analogRead(RANGE_FINDER_INPUT_PIN);
Serial.println(val); // units
if (val >= 0 & val <= NUMBER_OF_UNITS_TO_SENSOR)
{
digitalWrite( BUZZER_OUTPUT_PIN, HIGH); // turns the buzzer on
}
else
{
digitalWrite( BUZZER_OUTPUT_PIN, LOW); // turns the buzzer off
}
}
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
198
Followers
46
Author:Lynne Bruning(Lynne Bruning)