# Using a LilyPad & Pressure Sensor to Monitor Bird Food Levels

526

2

2

In my house we have a parakeet, Henry. Because Henry only eats the meat of the seeds and not the shells, and he discards the shells back into his dish, it’s impossible to tell at a glance if he has enough food or if his dish is full empty shells. I created this project to use the LilyPad, a pressure sensor and an LED to indicate when the weight was low enough it needed to be refilled.

There are some great tutorials about how to use an Arduino pressure sensor to work with LilyPads and textiles. I had a hard time finding information on using one without a textile. This project fulfills a class requirement to solve a real-world problem with code.

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Assemble Materials

2 Coin cell batteries
1 LED
1 Force sensitive resistor
Alligator clips: 1 green, 2 black, 1 yellow, 1 red, 1 white
1 10k ohm resistor
1 220 ohm resistor

## Step 2: Code

This code is modified from code found here: http://samsneatprojectblogcode.blogspot.com/2016/0...

Copy and paste this code into your Arduino window:

int pressurePin = A0;
int force;
int LEDpin = 12;
void setup() {
Serial.begin(9600);
pinMode(LEDpin, OUTPUT);
}
void loop() {
Serial.println(force);
if(force > 50)
{
digitalWrite(LEDpin, HIGH);
}

else
{
digitalWrite(LEDpin, LOW);
}
delay(100);
}

## Step 3: Assembling Your Wires

Assemble your wires as shown in the photo. Need extra help? The video is an explanation I made for my professor. It will help explain the reasoning for the assembly.

## Step 4: Installation

Now, install it! Although I chose to switch to a breadboard for my prototype it is not necessary. I was limited by space. If you have a better spot to place your set up I highly recommend keeping to the alligator clips.

## Recommendations

• ### Internet of Things Class

22,852 Enrolled

## 2 Discussions

You are right, there are not many examples of LilyPad use outside of eTextiles. I like to introduce Arduino using the LilyPad Arduino because it opens up the possibilities for beginning projects to include both eTEXTILE and nonTEXTILE projects - thus appealing to a broader more diverse audience. As you have demonstrated here, many early Arduino projects can be done on a LilyPad and and the addition of conductive thread to the collection of wires and sensors opens up so many possibilities.