Updates from October, 2012 Toggle Comment Threads | Keyboard Shortcuts

  • Yury Gitman 9:58 pm on October 28, 2012 Permalink | Reply  

    Parts Left To Buy for Rest of Semester 

    The Things Left to Buy For Rest of Semester
    1)  Thin Speaker x 1 pcs [If you ordered 2 before, you don’t need a 3rd, just 2 speakers for all semester]
    https://www.sparkfun.com/products/10722?
    $0.95

    2)  Wireless Transmitter,  RF Link Transmitter – 434MHz  x 1 pcs
    https://www.sparkfun.com/products/10534?
    $3.95

    3)   Wireless RF Link Receiver – 4800bps (434MHz)  x 1 pcs
    https://www.sparkfun.com/products/10532
    $4.95

    4)  Pulse Sensor Amped x 1 (use provided promotion code in email)

    https://pulsesensor.myshopify.com/collections/frontpage/products/pulse-sensor-amped

    5)
    2 Arduinos for Final
    http://www.amazon.com/gp/offer-listing/B006H06TVG/ref=sr_1_1_olp?ie=UTF8&qid=1351457275&sr=8-1&keywords=arduino&condition=new   ~22$

    Yury  already ordered and will Bring to Class

    6)  Mini Photocell x 1 pcs    $1.50

    7) Vibration Motor x 1 pcs    First one is free. If you break it second is $2.

    8) Diode Rectifier – 1A 50V  x 1 pcs 

    9)  Capacitor Ceramic 0.1uF x 1 pcs

    10) NPN Transistor x 1 pcs

    Optional:
    If you like the wirewrap tool, the best priced one I’ve ever seen is here. Makes sure to get “30 AWG”:
    http://www.amazon.com/Jonard-WSU-2224-Strip-Unwrapping-Diameter/dp/B007A1ZWYQ/ref=sr_1_3?ie=UTF8&qid=1351275636&sr=8-3&keywords=wire+wrap+tool

     
  • Yury Gitman 8:08 pm on October 28, 2012 Permalink | Reply  

    Simon Say Style Game, Midterm, Deliverables 

    Hi All,

    As discussed in class.  We are finishing off the Simon Says project this week.
    For the next class you will present your “Simon Says Style Project”, along with a video of it.

    The video should be 60-120 seconds long.  It should show 3 users using/playing with the project.  It should show interaction with your project start to finish. We should see how the interaction starts, how interaction is sustained, and how it ends.   The video should have two tiles, one with the projects name, one with your name.  Feel free to add more if you like, but those are the most basic requirements.  Try to have fun with the video and capture the essences of you work.

    Note:  The video should be on the blog before class starts. If you are new to video, it’s acceptable to shoot this with a simple camera.  Use as much natural light as possible with low-end camera to get good results on video.  Many of you know Final Cut already, so if you do, that may be the fastest tool for you. But it’s totally fine to edit with YouTube’s editing tools.  YouTube does allow for title effects.  Post your final video on Vimeo or YouTube and Embed into your post.

    Send any thoughts or questions you may have before then.

     
  • Amp 6:37 pm on October 26, 2012 Permalink | Reply  

    Jonard wrap tool 

    Here is the link to cheap

    Jonard Wrap/Strip/Unwrapping Tool

     

    http://www.amazon.com/Jonard-WSU-2224-Strip-Unwrapping-Diameter/dp/B007A1ZWYQ/ref=sr_1_3?ie=UTF8&qid=1351275636&sr=8-3&keywords=wire+wrap+tool

     
  • sussesj 2:54 pm on October 26, 2012 Permalink | Reply  

    My Simon 

    Here is a link to my simon, with the photo sensors in stead of tilt sensors – they were to acurate enough, when I wan turning the box.

    https://github.com/Sussesj/CC-LAB/tree/master/MySimon_Sensor

     
  • Yury Gitman 2:27 pm on October 26, 2012 Permalink | Reply  

    Simon Says Build Slideshow 

    https://plus.google.com/photos/105307847282252311120/albums/5803620979412077633

     
  • trytobegood 9:11 pm on October 19, 2012 Permalink | Reply  

    My Simon Code 

    I added a 5th button to reset the game.

    (More …)

     
  • JeannetteSubero 6:15 pm on October 19, 2012 Permalink | Reply  

    Simon Code 

    Simon Says Work in Progress… Not working code!

    https://github.com/jeannettesubero/PComp-Codes/tree/master/SimonSaysNotWorking

     
  • Chy 5:50 pm on October 19, 2012 Permalink | Reply
    Tags: sourcecode   

    CHY’s not working Code 

    int level = 0;
    int time = 1500;
    int ledLight[] = {
      4,5,6,7};
    int button[] = {
      12,9,10,11};
    int whatSimonSays[99];
    boolean lose = false;
    boolean simonSaid = false;
    int mySteps = 0;
    
    void setup()
    {
      Serial.begin(9600);
      for(int i = 0; i < 4; i++){
       pinMode(ledLight[i],OUTPUT);
        pinMode(button[i],OUTPUT);
      }
    }
    void loop()
    { 
      if(level < 11) // if havent reach level 11, the game og on
      {
    //    Serial.println("step1");
        if(!lose) //if havent lost the game, the game go on
        {
    //       Serial.println("step2");
          if(!simonSaid)  //if simon doesnt say anything
          {
    //         Serial.println("step3");
            ,simonSays(level); //simon start saying
          }
          else //if simon said
          {
            userTuren(level);
    //         Serial.println("step4");
          }
        }
      }
      else if(level == 11)
      {
        Serial.println("YOU WIN!!");
    //    delay(50000);
    //    level = 0;
    //    time = 1500;
      }
    }
    
    void simonSays(int level)
    {
    //  Serial.println("step5");
      for(int i = 0; i < level ; i++ )
      {
        whatSimonSays[i] = int(random(1,5)); //in 1-2-3-4 form
        int nowLight = whatSimonSays[i];
        digitalWrite(ledLight[nowLight], HIGH);
        Serial.print("Simon said ");
        Serial.println(ledLight[nowLight]);
        delay(time);
        digitalWrite(ledLight[nowLight], LOW);
      }
       simonSaid = true;
    }
    
    void userTuren(int level)
    {
    
      if( mySteps <= level )
      {
        for(int i = 0; i < level; i++)
        {
          for(int j = 0; j < 4 ; j++)
          {
            if(digitalRead(button[j]) == 0)
            {
              digitalWrite(ledLight[j],HIGH);
              delay(500);
              if(j == whatSimonSays[i] )
              {
                mySteps++;
              }
              else
              {
                Serial.println("GAME OVER!!!");
              }
              digitalWrite(ledLight[j],LOW);
            }
          }
        }
      }
      if(mySteps == level)
      {
        simonSaid = false;
        mySteps = 0;
        level++;
        time -= 50;
      }
    }
    
     
  • itsjennkaye 5:45 pm on October 19, 2012 Permalink | Reply  

    Simon Code Progress 

    This week I worked on getting the Simon code to respond to a user’s input. I started from the example files that Yury provided and modified the code to work with my breadboard set-up and play the “you lose” tone if the canned user input was wrong. I also worked on getting the Arduino to read the button input (HIGH or LOW) as values of user input that could be compared to Simon’s array.

    The tactic I tried for evaluating the user input was to store the data as an array and check that array against Simon’s. After doing some research I found a discussion on a Processing forum that provided code for reading and storing bytes of data from an Arduino.

    I was able to incorporate this code into my sketch. I could open the serial monitor, input a few numbers, and have the code write those numbers back to me. I then attempted to get button output to behave the same way, but was unsuccessful.

    Here’s my code:

    Download 1 ›
    Download 2 ›

     
  • tiamtaheri 5:40 pm on October 19, 2012 Permalink | Reply  

    [simon says] 

    //Button Pins

    const int redButt = 11; // declare pins for buttons
    const int yellButt = 10;
    const int blueButt = 9;
    const int greenButt = 8;

    //LED Pins
    const int redLED = 2; // declare pins for LED’s
    const int yellLED = 3;
    const int blueLED = 4;
    const int greenLED = 5;
    // Color Code we Use for R,Y,B,G and 1,2,3,4 repectfully
    const int redValue = 1; // declare values for colors for buttons
    const int yellValue = 2;
    const int blueValue = 3;
    const int greenValue = 4;

    const int speakerPin = 7 ; //declare your speaker pin

    boolean simonDone;
    int simonSays[99] ={
    };
    int nextStep = 0 ;
    int userStep=0;

    int simonSpeed = 300;
    void setup()
    {
    pinMode(redLED, OUTPUT); //Set Pin Mode
    pinMode(yellLED, OUTPUT);
    pinMode(blueLED, OUTPUT);
    pinMode(greenLED, OUTPUT);
    pinMode(speakerPin, OUTPUT); // set speaker to output
    Serial.begin(9600);
    randomSeed(analogRead(0));
    }

    void loop ()
    {
    if (simonDone == false)
    {
    simonSays[nextStep] = random(1,5) ;

    // Serial.print(“nextStep: ” );
    // Serial.println(nextStep);

    // 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]);
    Serial.print(” , “);
    delay(simonSpeed); // controls speed that simonSays something

    playToneAndLight(simonSays[i]);

    }

    simonSpeed= (simonSpeed – (nextStep*5)); // This seeds up Simon on each turn by forumla (500-(nextStep*5).
    // Change the multiplier (5 in this case) to make game faster or slower
    // The multiplier is MAJOR factor in how hard the game is.
    // This sets Simon’s TOP SPEED. Also important in making game interesting yet winable.
    simonSpeed = max(simonSpeed, 200); //this maxes out simon speed at 200 ms
    simonDone = true;
    //Serial.println(” “);
    }
    if (simonDone == true)
    {

    if(digitalRead (redButt)==LOW) {
    playToneAndLight (1);
    userCheck(1);
    }

    else if(digitalRead (yellButt)==LOW){
    playToneAndLight (2);
    userCheck(2);
    }

    else if(digitalRead (blueButt) ==LOW) {
    playToneAndLight (3);
    userCheck(3);
    }

    else if( digitalRead(greenButt) == LOW) {
    playToneAndLight(4);
    userCheck(4);
    }

     
    // nothing happening here yet
    // delay(1000);

    // Serial.println(“User got it right, add a new step and give Simon a Turn”);

    // // user completed successfully, give simon the next turn
    // // add one more step to simon’s sequence
    }
    }
    void userCheck (int x) {
    Serial.println(“–starting values–“);
    Serial.print(“value checking against “);
    Serial.print(simonSays[userStep]);
    Serial.print(” “);
    Serial.print(“value user “);
    Serial.println(x);
    Serial.println(” user “);
    Serial.println(userStep);
    Serial.println(” simon “);
    Serial.println(nextStep);
    Serial.println(“—-“);

    if(x==simonSays[userStep]) {

    Serial.println(“User right”);
    if(userStep == nextStep) {
    simonDone = false;
    nextStep++;
    userStep=0;
    }
    else {
    userStep++;
    }
    }
    else {
    tone(7, random(100,3000), 100);
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    digitalWrite(5,HIGH);
    delay(100);
    digitalWrite(2,LOW);
    digitalWrite(3,LOW);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    delay(100);
    tone(7, random(100,3000), 100);
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    digitalWrite(5,HIGH);
    delay(100);
    digitalWrite(2,LOW);
    digitalWrite(3,LOW);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    delay(100);
    tone(7, random(100,3000), 100);
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    digitalWrite(5,HIGH);
    delay(100);
    digitalWrite(2,LOW);
    digitalWrite(3,LOW);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    delay(100);
    nextStep=0;
    userStep=0;
    simonDone = false;
    Serial.println(“Failure”);
    }
    Serial.println(“–outputnext–“);
    Serial.println(userStep);
    Serial.println(nextStep);
    Serial.println(“—-“);
    }

     

     

     
  • lizbethc 5:40 pm on October 19, 2012 Permalink | Reply  

    Simon says progress 

    Here is the code I have so far in terms of the game: at the bottom is the tone and light (not sure how to  otherwise upload the code)

     

    ///Attempt to get simon to listen for user imput

    //program Arduino to listen for user imput and compare it to what Simon says.
    //The out come should trigger a lose sound, or tell Simon to say something next.

    //LOSE SOUND #4*****

    // void loop() {
    // for (int y=200; y>80; y-=5){
    // for (int x=300; x>50; x-=25){
    // tone(6, y);
    // delay(200); ///play with dealy “ratio”
    // noTone(6);
    // delay(10);
    // tone(6, x);
    // delay(300); ///play with dealy “ratio”
    // noTone(6);
    // delay(10);
    // }
    // }
    // delay(7000);
    // }
    //buttons
    const int switch1 = 2; //green
    const int switch2 = 3;//blue
    const int switch3 = 4;//red
    const int switch4 = 5;//yellow

    //leds
    const int greenLED = 8;
    const int blueLED = 9;
    const int redLED = 10;
    const int yellowLED = 11;

    //values
    const int greenVal=1; // declare values for colors for buttons
    const int blueVal=2;
    const int redVal=3;
    const int yellowVal=4;

    const int speakerPin = 12;

    int counter=0;
    Serial.begin(9600);
    Serial.println(“Try to Guest the Contents of simonArray, try a number between 1-4!”);
    int playerSays;

    boolean simonDone;
    int simonSays[99]={};// array that holds simon’s sequence, allows for 99 steps
    //int playerSays[99]={};

    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 () {
    pinMode(greenLED, OUTPUT);
    pinMode(blueLED, OUTPUT);
    pinMode(redLED, OUTPUT);
    pinMode(yellowLED, OUTPUT);
    pinMode(speakerPin, OUTPUT);

    // pinMode(switch1, INPUT);
    // pinMode(switch2, INPUT);
    // pinMode(switch3, INPUT);
    //
    // digitalWrite(switch1, HIGH); //turn on internal pull-up on siwtch1
    // digitalWrite(switch2, HIGH);
    // digitalWrite(switch3, HIGH);

    // Serial.begin(9600);
    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(“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

    playToneAndLight(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

    delay(500);
    simonDone=true; //ok, simon done, set to true
    Serial.println(” “);
    }

    if (simonDone==true) {

    // int val1=digitalRead(switch1);
    // int val2=digitalRead(switch2);
    // int val3=digitalRead(switch3);
    // int playerSays[99]={
    // val1=1,
    // val2=2,
    // val3=3,
    // };// array that holds player’s sequence, allows for 99 steps
    // Serial.println(“playerSAYS”);
    // if (simonSays==playerSays) {
    // tone(6, 800, 500); ///sound for getting it right
    // digitalWrite(greenLED, HIGH); //turn led on as TEST
    // delay(500);
    // }
    //

     
    void playToneAndLight(int color)
    {

    Serial.print(“inside PlayToneAndLight “);
    Serial.print(” color = “);
    Serial.println( color );

    if(color == 1) // 1 = Red
    {
    digitalWrite( greenLED,HIGH);
    tone(speakerPin,1000);
    delay(simonSpeed);
    digitalWrite( greenLED,LOW);
    noTone(speakerPin);
    }

    if(color == 2)
    {
    digitalWrite( blueLED,HIGH);
    tone(speakerPin,2000);
    delay(simonSpeed);
    digitalWrite( blueLED,LOW);
    noTone(speakerPin);
    }

    if(color == 3)
    {
    digitalWrite( yellowLED,HIGH);
    tone(speakerPin,3000);
    delay(simonSpeed);
    digitalWrite( yellowLED,LOW);
    noTone(speakerPin);
    }

    if(color == 4)
    {
    digitalWrite( redLED,HIGH);
    tone(speakerPin,4000);
    delay(simonSpeed);
    digitalWrite( redLED,LOW);
    noTone(speakerPin);
    }
    }

    // Serial.println(“simonDone ==true”);

    delay(500);
    Serial.println(“User got it right, add a new step and give Simon a Turn”);
    simonDone=false; //user completeed successfully, give simon next turn
    nextStep++; //add another step to simons sequence
    }

    }

     
  • carolkozak 5:35 pm on October 19, 2012 Permalink | Reply  

    Simon2 

    const int ledPinWhite = 8;  //white light
    const int ledPinRed = 9; //red light
    const int ledPinYellow = 10; //yellow light
    const int ledPinGreen = 11;  //green light
    
    const int switchWhite = 3; //white switch
    const int switchRed = 4; //red switch
    const int switchYellow = 5; //yellow switch
    const int switchGreen = 6;  //green switch
    
    int switchArray[] = {3, 4, 5, 6};
    int switchCount = 4;
    
    int simonSays[99] = {};
    int nextMove = 0;
    
    
    void setup()
    {
      Serial.begin(9600);
     
     pinMode(switchWhite, INPUT); //white switch is now an input
     digitalWrite (switchWhite, HIGH);  //turns on a resistor inside the pin so it isnt always on
     
     pinMode(switchRed, INPUT); //red switch is now an input
     digitalWrite (switchRed, HIGH);  //turns on the resistor
     
     pinMode(switchYellow, INPUT);  //yellow switch is an input
     digitalWrite(switchYellow, HIGH);  //turns on the resistor
     
     pinMode(switchGreen, INPUT);  //green switch is an input
     digitalWrite(switchGreen, HIGH);  //turns on the resistor
     
     int aSwitch;
     for (int aSwitch = 0; aSwitch < switchCount; aSwitch++)
     {
       if(aSwitch == 0)
      {
       digitalWrite(ledPinWhite, OUTPUT);
      }
      if(aSwitch == 1)
      {
       digitalWrite(ledPinRed, OUTPUT);
      }
      if (aSwitch == 2)
      {
       digitalWrite(ledPinYellow, OUTPUT);
      }
      if (aSwitch == 3)
      {
       digitalWrite(ledPinGreen, OUTPUT);
      }
     }
     pinMode(ledPinWhite, OUTPUT);  //White LED is an output
     pinMode(ledPinRed, OUTPUT);  //Red LED is an output
     pinMode(ledPinYellow, OUTPUT);  //Yellow LED is an output
     pinMode(ledPinGreen, OUTPUT);  //Green LED is an output
    
    
    }
    
    void loop()
    {
      simonSays[nextMove] = random(1,5);
     
      Serial.print("nextMove: ");
      Serial.println(nextMove);
     
      for (int i = 0; i <= nextMove; i++)
      {
       Serial.print("simonSays");
       Serial.print(simonSays[i]);
       delay(20000);
      }
     
     
      for (int aSwitch = 0; aSwitch < switchCount; aSwitch++)
     {
       if(aSwitch == 0)
       {
      digitalWrite(ledPinWhite, HIGH);
      digitalWrite(ledPinRed, LOW);
      digitalWrite(ledPinYellow, LOW);
      digitalWrite(ledPinGreen, LOW);
       }
       if(aSwitch == 1)
       {
        digitalWrite(ledPinRed, HIGH);
        digitalWrite(ledPinYellow, LOW);
        digitalWrite(ledPinGreen, LOW);
        digitalWrite(ledPinWhite, LOW);
       }
       if (aSwitch == 2)
       {
        digitalWrite(ledPinYellow, HIGH);
        digitalWrite(ledPinGreen, LOW);
        digitalWrite(ledPinWhite, LOW);
        digitalWrite(ledPinRed, LOW);
       }
        if (aSwitch == 3)
       {
        digitalWrite(ledPinGreen, HIGH);
        digitalWrite(ledPinWhite, LOW);
        digitalWrite(ledPinRed, LOW);
        digitalWrite(ledPinYellow, LOW);
       }
     }
    
     if (simonSays[1] == switchArray[0])
      {
       Serial.print("Correct!");
      }
    
      else
      {
        Serial.print("Incorrect!");
      }
      if (simonSays[2] == switchArray[1])
      {
       Serial.print("Correct!");
      }
    
      else
      {
        Serial.print("Incorrect!");
      }
       if (simonSays[3] == digitalRead(aSwitch = )
      {
       Serial.print("Correct!");
      }
    
      else
      {
        Serial.print("Incorrect!");
      }
      if (simonSays[4] == switchArray[3])
      {
       Serial.print("Correct!");
      }
    
      else
      {
        Serial.print("Incorrect!");
      }
    }
     
     
    /*  Serial.print(digitalRead(switchBlack));
      int val1 = digitalRead(switchBlack);
      if (val1 == 0)
      {
    digitalWrite(ledPinRed, HIGH);  //turn LED on
    
      }
      else
      {
        digitalWrite(ledPinRed, LOW); //turn LED off
      }
       Serial.print(digitalRead(switchGreen));
      int val2 = digitalRead(switchGreen);
      if (val2 == 0)
      {
        digitalWrite(ledPinBlue, HIGH);  //turn LED on
    
      }
      else
      {
        digitalWrite(ledPinBlue, LOW); //turn LED off
      }
     
    } */
    
     
  • YiNing 5:33 pm on October 19, 2012 Permalink | Reply  

    My Simon Says not working code… 

    this is YiNing’s not working Simon code….

    boolean simonDone;
    int simonSays[99] ={};
    int user[99] = {};
    int nextStep = 0 ;
    int usernextStep = 1;
    
    int simonSpeed = 500;
    int ledpin[4] = {};
    int btnpin[4] = {};
    int count = 0;
    
    int debouncedelay = 10;
    boolean debouncefunction(int pin){
      boolean state;
      boolean previousState;
    
      previousState = digitalRead(pin);
      for(int counter =0; counter > debouncedelay; counter++){
        delay(1);
        state = digitalRead(pin); //readpin
          if(state != previousState)
          {counter = 0;
          previousState = state;
          }
      }
      return state;
    }
    
    void setup()
    {
      for(int i = 4; i < 8; i++){
        pinMode(btnpin[i], INPUT);
      }
    
      for(int i =8; i < 12; i++){
        pinMode(ledpin[i], OUTPUT);
      }
    
      Serial.begin(9600);
      randomSeed(analogRead(0));
    }
    
    void loop ()
    {
      if (simonDone == false)
      {
        simonSays[nextStep] = int(random(1,5)) ;
        Serial.print("nextStep: " );
        Serial.println(nextStep);
    
        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]);
          Serial.print(" , ");
        if(simonSays[i] == 1){
          digitalWrite(8, HIGH);
          delay(300);
          digitalWrite(8, LOW);
        }
        if(simonSays[i] == 2){
          digitalWrite(9, HIGH);
          delay(300);
          digitalWrite(9, LOW);
        }
        if(simonSays[i] == 3){
          digitalWrite(10, HIGH);
          delay(300);
          digitalWrite(10, LOW);
        }
        if(simonSays[i] == 4){
          digitalWrite(11, HIGH);
          delay(300);
          digitalWrite(11, LOW);
        }
          delay(simonSpeed);
        }
    
        simonSpeed= (simonSpeed - (nextStep*5));
        simonSpeed = max(simonSpeed, 200);
    
        simonDone = true;
        Serial.println(" ");
      }
    
      if (simonDone == true)
      {
        //delay(3000);
        Serial.println("User's turn");
        Serial.print("User says:  ");
        for(int i = 0; i <= nextStep; i++){
          boolean wait = true;
          if(user[i] != 1 || user[i] != 2 || user[i] != 3 || user[i] != 4){
            if(wait == true) {
              for(int i = 0; i <count+1; i++){
              delay(count);
              count++;
              }
            }
          }
          if (digitalRead(4) == HIGH){
            wait = false;
            Serial.print("1");
            user[i] = 1;
            delay(200);
          }
          if (digitalRead(5) == HIGH){
            wait = false;
            Serial.print("2");
            user[i] = 2;
            delay(200);
          }
          if (digitalRead(6) == HIGH){
            wait = false;
            Serial.print("3");
            user[i] = 3;
            delay(200);
          }
          if (digitalRead(7)== HIGH){
            wait = false;
            Serial.print("4");
            user[i] = 4;
            delay(200);
          }
          if (user[i] == simonSays[i]){
            //usernextStep ++;
            Serial.print(" , ");
            //if(usernextStep == nextStep + 1){
              Serial.println("User got it right, add a new step and give Simon a Turn");
              simonDone = false;
            //}
          }
        }
        nextStep++;
      }
    }
    
     
  • kristenkersh 6:34 pm on October 18, 2012 Permalink | Reply  

    Simon Says : Design, iterations, testing and code 

     

    —————First Sketches—————-

    Idea 1: 

    Here is the first idea. I know there are only 3 cylinders and their needs to be four. Each tube would be filled with water. Below the tube in a dry area is a LED light that illuminates the enclosed water. These tubes are situated within a clear box. Half way down the box is slightly froster. Here will be 4 buttons associated with the color and sound. In this area in the box the lights, speakers, and other hardware is all hidden.

    Idea 2:

    Pcomp Notes (3)

    Idea 3:

    A large clear box with original size light bulbs as seen below.

    Shopping at the container store:

    Container store

     

    ——————–Iteration # 1————————

    Construction:

    User tester 1 “it’s too fast!”

    User tester 2 “its too hard!”

     

    ———————————Iteration #2———————————

    Changes Made / Final iteration:

    • made a start sound
    • slowed down the pattern and the sound
    • less levels

     

    Code: 

    first Simon simon code Startsoundcode

     
  • kristenkersh 3:37 am on October 18, 2012 Permalink | Reply
    Tags: Kristen Kersh Makers fair   

    Makers Fair / Who am I and first toy 

    ——————Who I’m ———————-
    1) I’m originally from New York City and  attended the University of Colorado at Boulder from 2004-2008. I graduated with a  B.A. in Anthropology, B.A.H. in art history and a certificate in Technology Arts and Media. I worked as a middle school special education teacher through Teach for America in Denver from 2008-2010. I moved to Chicago in 2010 and worked as a teacher and then at Groupon under the entrepreneurial in residence. Last year I attended the Harvard Graduate school of Education’s Mind, Brain and Education program which is the study of cognitive neuroscience and earned a EdM.
    2) I’m interested in creating interactive technology that supports positive cognitive development during specific periods of growth.
    3) My favorite toys are pin ball machines specifically a guns and roses version I used to play with my dad.
    ————————First Toy —————————
    GunsnRoses

    ——————-Makers Fair—————————

    The first project I looked at was called speaking in tongues by John Driscoll. It used a piece of silver aluminum foil that spinned. This piece used a small motor to spin the foil. There were two sensors that read the surface of the foil. Each craves the sensor reads would make a different sound. The artist was really nice and wanted to help me in the future with my work.

    The second project I was looking at was interesting because it was similar to a project Tiam and I were trying to figure out for Major studio. This project was a small proto-type that the artists plan to implement on the scale of a large room. Although we thought this project used EL wires they simulated an EL wire effect by using fiber optic cable and putting one LED at the top. Then the light from the LED illuminated the rest of the tube.

    The last project that caught my eye was the EXP. Ins. X. project. This piece used touch interaction with sound. As you touched the sensors. Images were also produced in reaction to the sound. I’m interested in using sound so this piece fascinated me.

     
  • Yury Gitman 12:25 pm on October 14, 2012 Permalink | Reply  

    Simon Says, Starter Code and Assignment 

    Here is some Code to get you started with Simon Says.  There are 3 steps in the code. It helps setup the Simon “brain” part of the game.

    https://docs.google.com/open?id=0B5C5Fh-HOLYFVndRRHdkOW1CdHc

    For the assignment, program Arduino to listen for user imput and compare it to what Simon says.  The out come should trigger a lose sound, or tell Simon to say something next.   Work in groups of 2.

     
  • Ogthugs 5:10 pm on October 12, 2012 Permalink | Reply  

    blue sky enclosures 

     
  • trytobegood 4:04 pm on October 12, 2012 Permalink | Reply  

    Game sounds 

    I’m still missing 2 sounds!

    Download my code

     

     

     

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel