13th Nov DM2009 Performance Day!

I waited anxiously for near an hour for the IT office to open. Luckily it did, and I get to borrow some components that I need for my project. I didn’t have class in the morning so I went straight to the lab to continue working on my project. After that I had to rush to my EEE lab session because our team’s web app will be assessed today too. Luckily it went well and we finished earlier. Therefore, I had some extra time to work on my project before the DM2009 class starts.

I faced some problems today as the open-ended wire no longer gives a constant input 1 when it is touched. Weird enough! Luckily it showed some changes in the value when it is connected to the analog input. When it is touched, the analog value goes down – probably the circuit is completed and well-grounded.

Then, I could not figure out how to play the right sound file according to the number of “votes” received. Luckily Mr. Dirk pointed out that this could be done by using “preload” and cue number as well. Then it works! I was so happy that the whole thing really works!!

Logic of the Game:

Logic of the game [in Max]

Logic of the game [in Max]

To judge:
Using Maxuino, Analog pins #1 to #3 are set to “D in” at the “set pin mode” section. The outputs of the analog input is connected to some comparators. If the values satisfy the condition (e.g, <=0.4), the “toggle” will be turned on. When it is “On” the “==1” condition is satisfied and value “1” will be fed to the adder “+”. “t b i” serves as a trigger to the add operator. The sum will give the player “sfplay~” a cue number to select a sound file (from preload list) to be played. The “gate” and “change” make sure that the sound file will be played correctly and smoothly.

To play:
Analog Pin #3 is set to “D in”. When its value is less than 0.15, the change will trigger the “metro” to send a bang to “random” which will generate a random number from 0 to 10. This number will serve as the cue number to the sound player “sfplay~”. There are several files preloaded with different numbers. For those numbers equal or more than 8 (>=8), the sound clip of “What does the fox say” will be played (jackpot!). These numbers will also set Digital Output #13 to 1 by turning on the “toggle”.

These are actually translated into json message and sent to the Arduino.

Circuit Connection

Overall circuit connection

Overall circuit connection

The circuit is quite simple. Two LEDs with one 330k Ohms resistor each are connected in parallel to the Digital Output 13 of Arduino. Three Photo-resistors with a 10k Ohms resistor each are connected to the  Analog Input 1 to 3 of the Arduino. An open-ended wire is connected to Analog Input 4 of the Arduino. The wires connected to the LEDs are made long because the LEDs have to be slotted into the “eyes” of the fox picture.

LEDs as the eyes of fox

LEDs as the eyes of fox

Game rules:

  1. First of all, the class is divided into teams of 4. Within the teams, the members have to play paper-scissors-stone to decide who is the player and who are the judges. The winners have to play against the winner and the ultimate winner within each team is the player whereas the rest of the team members will be the judges. [Aha! unexpected #1 the audience always perceive that the player has to be the one who loses, but not for this case~]
  2. There is a fox guarding a mystery box. In the box, there are some animals. In each round, one of the animals will stick out its tail from the box.
  3. For each team to pass the round, the player has to touch the tail (open-ended wire) of the unknown animal. The animal will make some noises and the player has to guess the animal.
  4. The judges will decide if the player is correct. If they think the player is right, the judges have to cover the photoresistors using their finger (each judge covers one photoresistor). The box will play different sounds according to the number of photoresistors being covered, i.e: if one, sound of applause; two, sound of cheers; three, it’s Oppa Gangnam Style! And it is time for the player to dance. [Aha! Unexpected #2 I made a twist here at the last minute because the player would be like,”huh? isn’t that suppose to be a punishment if i get it wrong?” But, no you have to perform for us instead because you got it right! ] The judges have to put their fingers on the photoresistor for as long as they want the player to dance. When they remove their fingers, the sound of applause will be played.
  5. The best part is when the player hits the jackpot! The sound clip of “What does the fox say” will be played and the little fox will be woken up! Its eyes (Red LED) will light up. The player has “stepped on” the tail of the fox and he/she has to tell the audience what does the fox say! Ring-ding-ding-ding-dingeringeding!
  6. Same thing here. The judges have to judge if the player has made the right sound and decide if the player should give us a dance. [Step 4]

Performance:

The performance was successful and I am glad that everyone was actively participated in the game!🙂 Thanks, my friends! I hope you had fun!

It is fun to see that different people have different values of resistance in their body. When some of my classmates touch the wire, the box did not give any sound. When I tap on my friend’s shoulder, the box will then give the animal sound. This was probably because I grounded the circuit (I’m wearing shoes with rubber soles) when I touched the person who was holding the wire.

There are 2 videos taken by Norton:

Part 1

Part 2

Pictures:

Setting up the project

Project set up

The 3 photoresistors for the judges

The 3 photoresistors for the judges

Circuit connection

Circuit connection

The circuit in the background (the mysterious animals in the box)

The circuit in the background (the mysterious animals in the box)

The tail of the animal (open-ended wire)

The tail of the animal (open-ended wire)

The fox has awaken! (its eyes - the LEDs, light up)

The fox has awaken! (its eyes – the LEDs, light up)

Reflection/Improvement:

If would be more fun if the player is judged by another team’s judges. Haha.

I am truly amazed by the programmer of MAX and the those who integrated MAX to Arduino.

Overall I find this course has brought me more fun and surprises than expected in the first day of lesson! Day to day, I find more and more passion for this module and I actually kind of sad because it is coming to an end. On top of that, I also found back my passion for electronic stuffs and programming after tinkering with MAX and Arduino. The experiences that I had from this module can never be found from my EEE courses.

I would like to thank my Instructor, Mr. Dirk Stromberg, for guiding us well through the course, helping us troubleshoot any problems that we had with our projects, and giving us much inspirations along the way! And thanks to my fellow classmates for making this module a very memorable and fun one!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s