Tuesday, May 20, 2014

Final Project

For my final project, I decided it would be fun to make a virtual pet rock with processing.


 First, I planned it out.  I decided I'd have three inputs from the arduino that processing would read.  I planned on a accelerometer for moving the rock around, and a thermistor and photoresistor for changing the rock's environment and his mood.  I was worried that drawing all of this in processing would be a daunting task, but then I figured out that processing can load in external svg images.

So, I made several images in Inkscape that are used to draw the rock.  The rock is made up of 5 components.  The base rock, the eyebrows, the eyes, the nose, and the mouth.  There are three sets of eyebrows (angry, distressed, normal), three sets of eyes (left, right, normal), two noses (normal and running), two mouths (normal and frowning), and just one base rock.  These components are drawn based on input from the sensors.Tilting his home left and right causes him to move left and right, back and forth causes him to move up and down, and if he ends up moving fast enough, he gets angry.  The light sensor affects the light level in his home, and if it's low enough, he gets distressed.  He also gets distressed if it gets too hot or too cold, and in the case of the latter, his nose will start running.


The pet rock's home, for now, is a mere cardboard box, seen in the first image.  Hook the box up to the computer with a micro usb <-> USB cable, and you can play with the pet rock.

Friday, April 25, 2014

Magic Bean Hunt

The game involves multiple players looking for magic beans.  Each player has a magnifying glass with a camera (as small and unnoticeable as possible) attached such that its view matches the player's view through the magnifying glass.  Each player also has a small device with a screen, which the camera communicates with through wiring, or, if possible, wirelessly.  The screen displays what the camera is looking at, but can display other things not visible to the naked eye (augmented reality).

There are various dried beans hidden around the play area.  Some of these beans will be magic beans, as revealed by the magnifying glass.  The goal is to find the magic beans, which each grant a lot of points.  Finding all of the magic beans ends the game, and whoever finds the final bean gets a small point bonus.

There are, however, other ways to earn points.  With the magnifying glass, the players can find other things in the environment that can give them points, such as a small family of gnomes in a bush.  They can also find hints as to the beans' locations, though hints don't grant points.  There may also be digital padlocks blocking progress.  To get past these, the player's must find a paper clip and bend it into the shape displayed on the padlock.  The magnifying glass will then register it on the device with the screen, which will unlock the padlock.  Unlocking padlocks also grants points.  At the end of the game, the player with the most points wins.

Tuesday, April 22, 2014

Sound Ripples

For our mic project, I created a program in processing that creates bubbles/ripples based on input from the arduino mic.


As the mic gets more/louder input, there are more and more ripples, and they get redder, have a longer end radius, and a longer lifetime.  The input on this picture was pretty minimal, with only one purplish ripple, and not many ripples in general.

Friday, April 4, 2014

Second Project - Project Runway

For my second project, I decided to make a glove that had an LED turn signal that could be turned on and off using a switch.  The plan was to use LEDs and a switch, of course, but also a transistor.  Before spring break, I got it working on the breadboard, so over spring break, I started sewing everything into a glove using conductive thread.  The first issue that I encountered was getting 6+ LEDs (I felt I needed that many at least for a reasonable arrow pattern) sewed in, secured, in the right pattern.  I ultimately couldn't get that to work out (guess I'm not so good at sewing) and ended up just using one LED.  Using one LED sorta defeats the purpose, but I guess it's still a kind of proof of concept, with a blinking LED sewn into a glove that can be turned on and off.  If it works with one, it'd work with several if you could get them sewn in like you wanted.

So I finally finished with the one LED and it didn't work.  I was pretty sure that my issue was that I used too much thread (not insulated) and not enough wires or insulated thread.  It was going everywhere and touching in places it shouldn't be.  In addition to this making it not work, it also made the glove get tangled up and made it hard to see how things were hooked up.  I ended up cutting off a lot of excess thread and replacing it with wires, and finally it worked.

Wednesday, February 19, 2014

"Calibration" Problem

In my previous post, I mentioned having trouble calibrating a temperature range, but when I woke up this morning I suddenly realized there was actually just a problem in my code.  So I've fixed that issue and my project works now.

Tuesday, February 18, 2014

First Project - "Blink"

For my first project, I decided to make an LED thermometer which can have its overall brightness adjusted.  I quickly realized I wouldn't be displaying exact temperatures, but the idea is to have a line of LEDs that light up as temperature increases.  So a low temperature might result in one fully lit LED (where "fully" is defined by the brightness setting) and a half-lit LED, with all other LEDs off.

This is what I ended up with.  It has 6 LEDs on one side, and on the other, a temp sensor and a potentiometer.  I think it works, but I've been having some trouble getting a good temperature range calibrated, especially in my room.