Cookie Monster Doctor
If you look at my last post, you can see that I made an 'interactive make-up bag'. That was kind of a disaster. Needless to say, I didn't get a good grade for that project. That's why I'm back now, but this time with something that actually works! That's what I call personal development.
For this project I decided I wanted to live my life-long dream of becoming a teddy bear doctor. I wanted to make a game where a teddy bear can have one out of three injuries/illnesses. It is up to you to find out what's wrong with the bear by inspecting it's body. The pressure sensors in the body will give you feedback on whether you found the problem or not. I wanted the problem to be random each time, so that a different pressure sensor responds. The feedback will be given by green and red LEDs.
Also, the store didn't have any more teddy bears, hence Cookie Monster.
Random LEDs
Before I gathered all of my pressure sensors, I did some research about making arduino do something random. I made my code generate a random number and connected some LEDs that responded to each number. This is what you can see in the first picture.
Next, I wanted a random pressure sensor out of multiple to light a green LED. The other(s) would light a red LED. After this, I made them reset. All of this was surprisingly easy (especially considering how much struggles I had last time). I think I found it easier this time because I have learned to work with C# in the meantime, so I understand the code a bit better.
Finally, I wanted to give each pressure sensor their own two LEDs. However, I wanted only one of the sensors to trigger a green LED, the other two would trigger red ones. After the green one was triggered, the code would reset and another random sensor would trigger the green LED.
To view my code, you can download the IDE file.
Downloads
Creating the Housing
After creating a very clear and brilliantly thought out schematic drawing of the setup, it was time to solder. I asked for some help with making a wooden plank that could house the LEDs.
The soldering went seamless, though I can't remember much of it due to all of the tin fumes I inhaled.
I put the wires inside a shoebox underneath Cookie Monster. My arduino was also in the shoebox.
Cookie Monster was cut open from the back (very gruesome). I added some hooks so that the back could close again. After pulling out some of the stuffing I was able to place the sensors. I put the stuffing back and that was that.
And it worked?! This is the first time one of my projects actually works, and I'm super happy with it. It does exactly what I want it to do. I hope this tutorial was useful, though I mostly used it as a personal blog.
Laura