Zen Ribbit
Updated video: Here
Updated video: Here
I’m so proud of my first d+t prototype! It’s not much but I have learnt a lot through each process. My simonBot makes terrible sound when you loose and also shake it’s head…it’s eyes blink in rhythm along with it’s heart that blinks color leds pattern. Thanks Yury for teaching us awesome trick about…
Here’s a link
I also want to share my “Flower Flipper.” I made this for cc lab class with arduino as well.
My Simon Game’s enclosure broke during the hurricane, and since most stores were closed, I had to improvise 🙂
People liked the vibration buzzer when they lost!
It was a really fun project. I really liked soldering the board for the vibration buzzer.
Voila! Play tested and all.
(and 2 “regular” videos documenting a successful game in and game loss)
Win:
<p><a href=”http://vimeo.com/53632459″>Simon: Win</a> from <a href=”http://vimeo.com/user8129509″>Jennifer Kaye</a> on <a href=”http://vimeo.com”>Vimeo</a>.</p>
Loose:
<p><a href=”http://vimeo.com/53632337″>Simon: Lose</a> from <a href=”http://vimeo.com/user8129509″>Jennifer Kaye</a> on <a href=”http://vimeo.com”>Vimeo</a>.</p>Here the video af my simons says game in action:
Also find more information about my process here:
Mine:
Here is my Simon Says game!!
<p><a
AND THE CODE:::
//buttons
const int greenSwitch = 10; //green
const int blueSwitch = 8;//blue
const int redSwitch = 4;//red
const int yellowSwitch = 6;//yellow
//leds
const int greenLED = 9;
const int blueLED = 7;
const int redLED = 3;
const int yellowLED = 5;
//values
//const int greenValue=1; // declare values for colors for buttons
//const int blueValue=2;
//const int redValue=3;
//const int yellowValue=4;
const int redValue = 1; // declare values for colors for buttons
const int yellowValue = 2;
const int blueValue = 3;
const int greenValue = 4;
const int speakerPin = 2;
int playerSays=0;//value to hold user imput
int playerStep=0;//user step counter;
boolean simonDone;
int simonSays[99]={
};// array that holds simon’s sequence, allows for 99 steps
int nextStep = 0; //var that counts how many steps in simon’s current sequence, used to move up in steps
int simonSpeed = 500;
void setup () {
Serial.begin(9600);
//Serial.println(“Try to Guest the Contents of simonArray, try a number between 1-4!”);
pinMode(greenLED, OUTPUT);
pinMode(blueLED, OUTPUT);
pinMode(redLED, OUTPUT);
pinMode(yellowLED, OUTPUT);
pinMode(speakerPin, OUTPUT);
pinMode(greenSwitch, INPUT_PULLUP); //set pull-up resistors on Buttons, So closing the switch will bring Pin to Ground.
pinMode(blueSwitch, INPUT_PULLUP);
pinMode(redSwitch, INPUT_PULLUP);
pinMode(yellowSwitch, INPUT_PULLUP);
randomSeed(analogRead(0)); //seed makes more random
}
void loop () {
if (simonDone ==false) { //did simon play sequence yet? bool is false by default
simonSays[nextStep] = random (1,5);
// Serial.println(“simonDone ==false”);
Serial.print(“nextStep: “); ///just to see whats happening
Serial.println(nextStep);
Serial.print(“simonSays: “);
// Serial.print(“simonSpeed: ” ); // Show how the new time feature works
// Serial.println(simonSpeed); // Show how the new time feature works
// Serial.print(“simonSays: “);
for(int i=0; i <=nextStep; i++) {
Serial.print(simonSays[i]); //to see count
Serial.print(",");
delay(simonSpeed);//controls speed that simonSays something
ToneAndLight(simonSays[i]);
}
//simonSpeed=(simonSpeed-(nextStep*5)); //THis speeds up simon on each turn by formula (500-(nextStep*5)
//Change the multiplier (5 here) to make game faster or slower
//multiplier=MAJOR factor in how hard game is
simonSpeed=max(simonSpeed, 200);//max() assigns simonTime to the larger of simonTime or 200 in this case
//Sets Simon's top speed. Also important in making game interesting yet winable
simonDone=true; //ok, simon done, set to true
//Serial.println(" ");
nextStep++; //add another to simon's sequence
playerStep=0; //make user step from first step
}
if (simonDone==true) {
if (playerStep =nextStep) {
simonDone=false; //user completeed successfully, give simon next turn
// nextStep++; //add another step to simons sequence
}
}
}
if(color == 1) // 1 = Red
{
digitalWrite( redLED,HIGH);
tone(speakerPin,1000);
delay(simonSpeed);
digitalWrite( redLED,LOW);
noTone(speakerPin);
}
if(color == 2)
{
digitalWrite( yellowLED,HIGH);
tone(speakerPin,2000);
delay(simonSpeed);
digitalWrite( yellowLED,LOW);
noTone(speakerPin);
}
if(color == 3)
{
digitalWrite( blueLED,HIGH);
tone(speakerPin,3000);
delay(simonSpeed);
digitalWrite( blueLED,LOW);
noTone(speakerPin);
}
if(color == 4)
{
digitalWrite( greenLED,HIGH);
tone(speakerPin,4000);
delay(simonSpeed);
digitalWrite( greenLED,LOW);
noTone(speakerPin);
}
}
void youLose() {
//LOSE SOUND #4*****
// tone(speakerPin,200);
// delay(400);
// tone(speakerPin,100);
// delay(600);
// tone(speakerPin,50);
// delay(1500); ///play with dealy “ratio”
// noTone(speakerPin);
for (int y=200; y>80; y-=50){
tone(speakerPin, y);
delay(150); ///play with dealy “ratio”
tone(speakerPin , (y-30));
delay(100);
noTone(speakerPin);
delay(50);
}
nextStep = 0;
playerStep = 0;
simonSpeed = 400;
simonDone = false;
delay(1500);
restartSeq();
delay(1500);
}
///DONT USE YET
void restartSeq(){
tone(speakerPin,600);//800
delay(100);
digitalWrite(redLED,HIGH);
digitalWrite(yellowLED,HIGH);
digitalWrite(blueLED,HIGH);
digitalWrite(greenLED,HIGH);
tone(speakerPin,700);//850
delay(100);
digitalWrite(redLED,LOW);
tone(speakerPin,900);
delay(400);
digitalWrite(yellowLED,LOW);
tone(speakerPin,1000);
delay(300);
digitalWrite(blueLED,LOW);
tone(speakerPin,2000);
delay(250);
digitalWrite(greenLED,LOW);
tone(speakerPin,3000);
delay(200);
noTone(speakerPin);
}
Do:
1) http://arduino.cc/en/Tutorial/AnalogReadSerial [POT]
2) Photocells – Adafruit Learning System
3) 2.16 from Arduino CookBook (on Switch Statements)
Read:
1) analogRead http://www.arduino.cc/en/Reference/AnalogRead
2) http://www.arduino.cc/en/Reference/AnalogWrite
Assignment:
Build a Sound Performance Toy. The Interface should be one POT, one LED, one Speaker, and one Photocell. There should be four case statements, and two jumper wire. If jumper wire are in or out, there are 4 possible states.
*1st State controls LED dim level with the POT, and Speaker with the the PhotoCell
*2nd State controls LED dim level with Photocell, and Speaker Tone with POT
*3rd State controls LED blink-rate with the POT, Speaker Tone with POT, and Delay Rate (for both) with PhotoCell
*4rd State controls LED blink-rate with the PhotoCell, and Speaker tone with PhotoCell.
Use with Case Statements to switch between 4 states.
Upload Code and Video of Circuit before Class.
Use Code and Pics for Hints: https://docs.google.com/folder/d/0B5C5Fh-HOLYFenF2UmthZWJ1QVk/edit
the tutorial page for AnalogReadSerial doesn’t exist anymore..
I used some soft materials to wrap and form my Simon. Inside the white fabrics are two pieces of wooden oil paint canvases that contain my Arduino board, speaker, vibration motor, LEDs, and battery.
My circuit broke when I was about to do user testing today. I will schedule another time to test and document it.
User test:
Reply