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.

Step 1: Assemble Materials

Lilypad Arduino
Lilypad battery pack
2 Coin cell batteries
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() {
pinMode(LEDpin, OUTPUT);
void loop() {
force = analogRead(pressurePin);
if(force > 50)
digitalWrite(LEDpin, HIGH);

digitalWrite(LEDpin, LOW);

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.

<p>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. </p>
<p>Awesome fix :)</p>

About This Instructable




More by CynthiaC80:Make Your Own Shrinky Plastic! Using a LilyPad & Pressure Sensor to Monitor Bird Food Levels 
Add instructable to: