Electronic Animal

I made an electronic animal for my project. I decided to make a gentle creature that falls asleep and starts to snore. The LEDs slowly fade to simulate falling asleep, and then blink awake when the animal first wakes up. I also wanted to make the snoring sound very soft and sweet, so I included a whistling sound on the exhale. It’s enclosed in a dust mop, which is soft and purple. Hopefully all these things together create a feelings of mildness and tenderness.

There were a few design challenges. I used a sound library so that I could record the sound onto the Arduino’s flash memory, rather than using an external WAV shield (although I think those might be fun and I may pick one up very shortly).

I found out through some initial errors that the sound function I used takes up two of the Arduino’s three timers, and therefore breaks the PWM function in pin 3, which is where I originally attached the LEDs. As a result, after the first time the animal fell asleep, the LEDs would no longer fade; they simply switched off. When I re-read the documentation on the library, plus the link here, I realized the mistake I’d made and changed the LEDs pin to 5, which still had the ability to fade out.

I also had to use trial and error to figure out how to make the photocell responsive. This tutorial on the Adafruit site helped a lot.

My code (along with a few iterations) is on my Github account here.

The video is here.

Week 7— Octopus:


For this project I wanted to learn how to use the laser cutter to make a creature. My original plan was to use wood, a PIR sensor, wave shield and 5 LEDS. Due the time constraint I ended up just working on the LEDS and getting the correct fade that I desired.

Steps CODE:

1) Basic code testing fade function with one LED

2) Code at 50% Duty Cycle which is equal to 127 with 2 LEDS and delay of 10 milliseconds.

3) For the final code instead of trying to cross fade the leds i decided to use a for loop to fade them all at once.




Link to Film: 





int ledPin = 9;    // LED connected to digital pin 9
int ledPin2 = 10;
int ledPin3 = 6;
int ledPin4 =11;
int ledPin5 = 3;
void setup()  {
  // nothing happens in setup
void loop()  {
  // fade in from min to max in increments of 5 points for loop :
  for(int fadeValue = 1 ; fadeValue <= 255; fadeValue +=5) {
    // sets the value (range from 0 to 255):
    analogWrite(ledPin, fadeValue);
analogWrite(ledPin2, fadeValue);
analogWrite(ledPin3, fadeValue);
analogWrite(ledPin4, fadeValue);
analogWrite(ledPin5, fadeValue);
    // wait for 30 milliseconds to see the dimming effect
  // fade out from max to min in increments of 5 points:
  for(int fadeValue = 255 ; fadeValue >= 1; fadeValue -=5) {
    // sets the value (range from 0 to 255):
    analogWrite(ledPin, fadeValue);
analogWrite(ledPin2, fadeValue);
analogWrite(ledPin3, fadeValue);
analogWrite(ledPin4, fadeValue);
analogWrite(ledPin5, fadeValue);
    // wait for 30 milliseconds to see the dimming effect
    delay(500 );

Crystal Ball

Here is my fortune-telling crystal ball!

I designed the behaviour of the LEDs to imitate the magical process of the crystal ball: initially ‘reading’ it’s subject, then slowly detecting imagery, then suddenly exploding in fortunes so that it blows out!  I aimed for the subject’s reactions to reflect these changes: starting off calmed, becoming increasingly curious and apprehensive, building to a climax of excitement, then suddenly stunned by it’s abrupt end…. what did it see?!

I found it challenging to create a sense of randomness rather than repetition with the loop function, so want to work on this further. However I’m pleased overall with the way the LEDs build in energy over time.

Video Reaction:

Crystal Ball meet Anthony!




Animal – Kitties!


My cat always reacts to my Arduino projects so I figured that I would use her as my inspiration.  And when I started to light the LEDs I thought of kitties along a fence – thus my image.  I wanted to create scaredy cats who “hid” when they heard a noise but after the noise turned off they came back out.  Since we needed four LEDs I decided to have four cats with one being the bravest who always comes back out first.  I wanted to give them a sense of curiosity like they were peeping out from behind a fence after hearing the noise.

Making the enclosure was more difficult than I thought it would be.  I originally wanted to poke the LEDs through the top of the box and reattach them to the Ardunio but I couldn’t see what I was doing very well and as soon as a few things were connected something else would disconnect.  I think soldering in the future will help with this issue.

Scaredy Cat Code


week8 – animal LED SUMMER NIGHT


My animal LEDs!!

Its name is SUMMER NIGHT. Though it’s fall now…

I missed Yayoi Kusama’s fireflies exhibition, so I have to make one for my own.


I put them into a transparent glass vase with a sheet of blue paper in it.

I planned to make two fireflies and a frog, but didn’t have the yellow LEDs.


Vimeo here.

Github here.

My problem is that I’d like to make these LEDs blink at the same time and with different frequencies, or totally random.

But they are just blinking in a certain order now.

Week 7 Assignment: Heartbeat Bunny


Originally, I wanted to make a stuffed animal I called “Fever Bunny” that would sense the temperature of whoever is holding it and light up with the person has a fever (which I could do by mapping the fever range to match the LED brightness (like we did in class with the potentiometer).

I sewed the bunny by hand (with fabric I used to recover my couch) and sewed three LEDs where the heart would be. Then, I wrote some code that made the LED look like a heart beat (which I think would be soothing). But, when I tried to incorporate the temperature sensor, I kept getting readings below 0* celsius. I tried a few different resistors in a few different positions – and was able to get an LED to respond – but I couldn’t control the temperature properly so I decided to ditch that sensor.

Instead, I used a photocell to control the brightness of the LED. When the room gets dark, the heart LEDs dim. Now it’s more of a nightlight bunny than a fever bunny, but it’s still soothing!

Here’s a picture of the bunny:

Here’s a picture of Dan interacting with the bunny:


And here’s the video of Dan interacting with the bunny: Video

And here’s a link to the repo.


Week 7



I made heartbeat using pulse-width modulation(PWM) with three LEDs; two red leds and a green led. I adjusted the parameter so that leds look like real heartbeat.Video