Updates from Lee Toggle Comment Threads | Keyboard Shortcuts

  • Lee 4:28 pm on May 16, 2011 Permalink | Reply  

    OmNom final post! 

    Positive emotional feedback reinforces good waste disposal practices. I created a waste bin (which I’ve named OmNom) that can communicate its wants and needs, making waste disposal more fun and rewarding while reinforcing users’ good habits. By providing understandable emotive feedback to influence users’ behavior, I’m capitalizing on the phenomenon in which
    people anthropomorphize nonhuman agents, often in an attempt to understand the motivations of nonhumans.

    OmNom is a product that brings your waste bin to life. OmNom consists of an LCD screen, Arduino Mega, a variety of sensors, LEDs and a Piezo buzzer. OmNom will roar happily when you open him and will beg for food while left open. If you leave him open for a while, he’ll get silly and stick his tongue out at a you. After you feed OmNom, he’ll thank you audibly. As OmNom gets full, his eyes will change color, transitioning from green to orange, based on how full he is. When OmNom is completely stuffed, his eyes will blink red and he’ll audibly alert you that he’s full and needs attention. When you open OmNom while he’s full, he’ll whine unhappily. After you empty OmNom, he’ll cheer happily and his eyes will turn from red back to green. If the room he lives in is dark, OmNom will be sleeping, his eyes will be blue and he won’t make any noise. The emotive feedback OmNom provides promotes proper waste disposal by making the experience less of a chore because you feel like you’re maintaining a pet that really appreciates all you do for it.

    Final Paper

    OmNom Presentation

     
  • Lee 10:03 pm on April 21, 2011 Permalink | Reply  

    OmNom presentation 

    Presentation!

    OmNom

     
  • Lee 2:53 pm on April 18, 2011 Permalink | Reply  

    OmNom Schedule etc. 

    I found this great precedence for my project!


    The build is going well I now have a rough prototype to understand the sort of size of container I’ll need. I’ve sent in my proposal to kickstarter and am waiting for approval. I have 1 completed personality of noises that are now triggered by the sensors. My next steps are to finish up the multiple personalities, install OmNom and start ding some testing, design a more finished container to be laser cut, and test, test, test.

    April 18
    Have all sensors installed and triggering reactions based on the kinds of interactions I’m expecting.

    April 21
    Have 1 more peronality crafted and a switch to allow the user to change personalities. Install the rough prototype in a waste bin. Have an illustrator file ready for the laser cutter.

    April 25
    Have done some initial user testing and begin to refine interactions, sounds, and code. Have all Personalities crafted and ready for tweaking. Hopefully have materials cut and read to be assembled for final housing.

    April 28
    Installed OmNom in new housing and have a OmNom bin setup on the 10th floor for mass user testing.

    May 2
    More improvements made and 2nd OmNom built and ready for deployment. Rough draft of paper finished. Start collecting all materials for final presentation.

    May 5
    Paper written and finished. Hopefully have raised gobs of money on kickstarter. Any final minor tweaks made. Presentation 90% finished.

    May 9
    Final presentation! and then drinks!

     
    • Behnaz Babazadeh 4:12 am on April 24, 2011 Permalink | Reply

      More precedence!
      Here is a project by a previous MFADT student and garbage cans-but not as awesome as omnom 🙂

  • Lee 10:01 pm on April 4, 2011 Permalink | Reply  

    OmNom is a go! 

    all Parts are ordered! So this weekend I started designing personalities, sounds and an enclosure.

     
  • Lee 10:20 pm on March 31, 2011 Permalink | Reply  

    Prototype Triangle 

     
  • Lee 9:00 pm on March 31, 2011 Permalink | Reply  

    Back to OmNom 

    So, I’m back to pursuing OmNom, this will be a fun and executable idea within the scope of time left in the semester.

    ROLES

    OmNom in public
    OmNom recycling bins in public will incentivize the recycling by providing an amusing and emotional response every time they’re used. By providing a happy and appreciative response users will be more apt to take the extra step of sorting their trash and using appropriate containers. Each container could have a sensor to let the city know when they’re full so trash collectors could empty full bins more efficiently.

    OmNom in the home
    If a user has an OmNom in the home they more than likely don’t need the emotive response to encourage behavior, more than likely they’re already avid recyclers. It would still provide amusement, reinforce their already good practice, and if they have children help instill a desire to recycle. The bins would alert users when full and could provide information on its use wirelessly to a configured computer.

    DOMAINS

    Sanitation, Environmental Awareness, Consumer Products, Smart Objects

    Implementation

    Arduino, wifi shield, ultrasonic rangefinder, speaker, LED’s, Photocell, load sensor, LCD screen

     
  • Lee 7:54 pm on March 28, 2011 Permalink | Reply  

    More super quick prototyping 

    Even though all these are super rough cardboard and paper glued and taped together, I’ve learned a lot already about some very specific areas I’ll need to research and focus on.

    (More …)

     
    • Lee Williams 10:12 pm on March 28, 2011 Permalink | Reply

      The easiest thing about prototyping for me is coming up with ideas and roles. I can easily imagine how things should work, what would be cool, and what would make something better, but when it comes to building a physical representational prototype. I often get hung up on materials, size texture, etc. Often I’ll start off treating physical physical things like precious objects and end up failing. Eventually I’ll finally let go and start throwing things together and get moving again.

  • Lee 6:07 pm on March 24, 2011 Permalink | Reply  

    6 ideas 


    Idea #1
    H.U.D. for Motorcycle Helemets
    A HUD system for displaying vital information on the visor of a motorcycle helmet. Instrument panels on motorcycles are by and large placed low around the triple tree. In order for a motorcyclist to monitor his speed or RPM’s he needs to take his eyes off the road ahead of him/her and quite literally look down. Always having this information within a riders field of vision will cause less distraction, allow riders to be more conscious of their speed and allow one to focus entirely on the road. Additionally it will also encourage the use of full face helmets.


    Idea #2
    Wearable Environmental Quality Monitor
    A wearable object which could provide ambient information about the quality of the environment a user is in. Preferable it’d be in the form factor of a watch or wristband that would change color based upon sensor input and strobe if levels were dangerous. When a user wants they could upload the data to a computer for an in depth analysis of their exposure.


    idea #3
    OmNom Recycling System
    Anthropomorphized smart recycling containers which talk to each other and your computer. Each container has a personality and lets you know it appreciates it when you feed them and will alert you when they’re full and need emptying. They’ll communicate wirelessly with your computer and tell you what you’ve been recycling and how much they appreciate it.


    idea #4
    Ambient Navigation System
    Device you wear which navigates a user by providing directional feedback in the form of vibration or other stimulus. Ideally it’d be in the form a bracelet/wristband that would buzz on top for straight on the left side for left, right etc. This would allow for users to follow turn by turn directions without needing to stare at their devices instead of watching where they’re going.


    idea #5
    Automatic Motorcycle 911
    Motorcycles are extraordinarily fun, but they are more dangerous than other forms of transportation and if a rider crashes and is alone he may not be able to physically retrieve or dial his cell phone. This device would dial 911 automatically and provide GPS coordinates of the riders location in the event of a crash.


    idea #6
    Radio Spectrum Visualizer
    Somehow detect and map all spectrum of radio waves in a specfic area and visualize the strength and type overlayed a live image. This is to help people understand the massive ammount of radio / electromagnetic radiation we’re constantly bombarded with.

    Here’s a Ven Diagram of my ideas domain’s.

     
    • scottpeterman 6:11 pm on March 24, 2011 Permalink | Reply

      Love, love, love the motorcycle HUD idea. Hell, I’d wear that just walking around!!

    • breegeek 12:30 am on March 25, 2011 Permalink | Reply

      The radio wave visualizer would also be awesome and trippy. Kind of like a lava lamp for the modern age.

    • mkmkmkmk 5:53 am on March 28, 2011 Permalink | Reply

      • Lee Williams 11:30 am on March 28, 2011 Permalink | Reply

        Exactly, I saw these over winter break and all I could think is WTF this is hardly even necessary for snowboarding why don’t motorcyclists have this tech

    • Karin Bakker 1:50 pm on April 30, 2012 Permalink | Reply

      Hi Lee,
      Love the picture you use in idea 6. I would like to use it in my theses on “exposure to electromagnetic fields”. (non commercial). Can you tell me how i can obtain a big format version i could use in print? I would be very grateful. Kind regards, Karin

  • Lee 3:44 pm on March 21, 2011 Permalink | Reply  

    Data logging and visualizing temperature 

    Second iteration. Now the data is logged and saved to text files for visualizing later and I’ve experimented with a circular graph. Temperature is sample and averaged over half hour periods, so each day has 48 samples. Unfortunately over the past week I haven’t been in one place for too terribly long, so I’ve only been able to successfully log one 24 hour period.


    This Friday March 18th I was in Martinsville VA and it was unseasonably warm, I managed to log data from around 11:30 AM through the rest of the day.


    I was still in VA on the 19th, but left in the early afternoon driving back to Jersey City NJ. I managed to log data from around midnight to noon. Once back at home in JC I setup the sensors around 10PM.


    Finally on the 20th I was able to capture a full 24 hour cycle and the weather was a lot colder than previous days.

    I would still like to add more to this program, like rollovers for each section so times and temps aren’t always displayed. I would also like to add time of day cycle icon/animation sunrise/sunset/moon rise/moon set etc. I’d like to revise the look and function of this circular style chart more as well.

     
  • Lee 1:55 pm on March 16, 2011 Permalink | Reply  

    xbee sleep, help! 

    I’ve been at this for over 24 hours now and I can’t get my xbee to sleep for any extended period of time. I followed the book example and I can get it to sample every second, but anything longer, nothing happens.

    Anyone else having trouble? Anyone have any tips? email me at pixeldot.lee (@) gmail.com

     
  • Lee 7:24 pm on March 10, 2011 Permalink | Reply  

    visualizing temperature data part1 

    This is iteration / step 1. Get some data from a wireless sensor and write some simple program to visualize it. I started simple since I’m a little rusty with processing. I need to see if there are any XBee libraries for codeBlocks or OF, processing just isn’t going to cut it.

    Anyhow, I started first by building up the look and creating a simple system for how incoming data would affect the chart. I got this setup before even touching my XBee’s, I simulated incoming data with a button press and spitting out a random temperature.

    Once I was happy with the look and feel I worked on hacking it together with all the XBee Sensor Network code which was actually a lot less painful than I imagined it was going to be. I’m not quite sure how to put the XBee’s into sleep mode yet, so the longest interval I could sample at was once a minute.

    I stuck the sensor and battery pack outside my window to track the temperature outside to test it out.

    I scaled up the chart and let it run for two hours.

    The initial warmer temps was residual heat from being inside. I checked my readings against what the internets were telling me was the current temperature and my little sensor proved to be pretty accurate.

    Good stuff so far, next iteration I’ll make a more interesting visualization and pull in data from another sensor or two. I’ll also make the program slightly interactive with some rollover info or make it clickable.

    (More …)

     
  • Lee 2:53 pm on March 7, 2011 Permalink | Reply  

    Bathroom Monitor – Lee 

    So this project is more of an exercise than a creative endeavor. I have 2 xbees, a couple photo resistors, LED’s and a servo. What can I make with that?

    I really focused in on the servo because it’s been in my toolkit for months and I’d yet to use it to actually make something move. This sparked the idea of analog public bathroom occupied signs. Now I know there’s no practical reason those switches should ever be replaced with digital wireless technology, that’s some crazy overkill, but the idea of making one of those analog style rollover signs seemed like an interesting exercise. I set about figuring out how something like that would work.

    First I looked into what kind of range my servo had because that would determine to a great extent the limitations of the design. The spec sheet says 90 degrees, but I found it could do about 110 degrees, I decided to split the difference and make my window 100 degrees.

    Next I choose an enclosure and measured the workable space I’d have and scaled my cutout window to it and then that determined how large the rotating sign could be. When the sign is vacant the hidden occupied portion needs to clear side and bottom of the enclosure.

    Now it was just a matter of building my circuits.

    At this point I decided to add some LED indicators as well in case the lights were off / could act as an ambient notification. It was time to test it out.

    and testing out the range.

    and my girlfriend though it was funny as well.

     
  • Lee 7:36 pm on February 17, 2011 Permalink | Reply  

    OM-NOM-Garbagecan 


    OM NOM is kinda scary and encourages waste. When you feed him he RAWRZ angrily, then he’ll aggressively begs for food, though he appreciates your actions after you feed him. If you don’t feed him for 12 hours he’ll get super P/O’d and let you know it.

    OM-NOM uses a photocell to know when his mouth is open, the LCD screen tells you his emotional state using text and image, and a little speaker lets him emote vocally.



    He has 4 states.
    +Opening Roar – When he first opens his mouth he kind of RAWRZ.
    +Begging – If you leave him open he keeps begging for food / garbage.
    +Happy – Once he’s been fed, he’ll emote happily and make an nom nom nom noise.
    +Hungry – If you don’t feed him for more than 12 hours he’ll repeatedly make an angry noise every 10 minutes until you feed him / throw something away.




    He’s constructed with a cleaned out delivery food container with all the various electronics held in place with duct tape, thumb tacks, and brass hangers. Pretty ghetto, but it works!

    CODE!
    (More …)

     
    • makingtoys 8:43 pm on February 17, 2011 Permalink | Reply

      Lee, great project. But please post your code in the post in the ‘read more’ section.

    • makingtoys 3:30 am on February 18, 2011 Permalink | Reply

      this project is awesome. i love this. this is “viral product” material.

    • makingtoys 3:45 am on February 18, 2011 Permalink | Reply

      great videos, great documentation.

      • Lee 3:27 pm on February 18, 2011 Permalink | Reply

        Thanks I fully intend to try and develop this more. I’d be interested to try and figure out how to actually sell it this summer.

  • Lee 6:31 pm on February 17, 2011 Permalink | Reply  

    Toy Fair / Best homework ever 

    Toy Fair was awesome. Obviously witnessed most of the same things as everyone else, but spent the majority of my time on the bottom floor.

    The flying fish were amazing, the simple tail movement buffets the fishes body in the air and makes it look super authentic. I only wish they were smaller, autonomous, and had some flocking code and proximity sensors built in, so you could just release a school of them and let them go. It’d be like living in a fish tank!

    Star Wars big head bobble heads! 0 technology here, but I want all of them!

    Keepon was stupidly cute. I don’t think it’s new I’m pretty sure I heard of it before, but had never witnessed it for myself.

    Bioliods were pretty awesome dancing machines

     
  • Lee 6:34 pm on February 10, 2011 Permalink | Reply  

    Three housemates 

    OM-NOM Garbage Can
    OM-NOM has two LED eyes, a speaker, motion sensor, and is activated by a flex sensor.

    When the lid/mouth starts to open he growls hungrily and his eye’s blink crazily.

    If the mouth stays open and nothing is placed inside he makes OM… OM… noise begging for food/garbage. His eyes blink each time he makes an OM noise.

    a motion sensor detects when an item is placed inside and then OM-NOM enjoys his food/garbage. OmNomNomNomNom, and his eyes blinking repeatedly.

    He’ll continue OmNomNomNom’ing for a little while after the lid is closed.


    Soap-O
    Soap-O has a force sensor, green & blue LED’s and speaker.

    Soap-O hangs out in your shower and holds your soap. When you pick up the soap, Soap-O gets excited, makes a happy noise and his eyes light up green and he starts strobing with blue color.

    When you place the soap back on Soap-O he makes a thank you noise and blinks his green eyes a couple of times.


    WoooDude
    WoooDude uses a light sensor, motion sensor, has RGB LED’s and a speaker.

    WoooDude chills out in your cabinet and gets super stoked when you visit him. He’ll make a super happy “HELLO!” noise then strobe different colors and make some happy noises.

    When you put something in or take something out of a cabinet, he thinks that’s pretty awesome and will congratulate you and blink his colors on and off.

    When you close the cabinet again he gets kinda bummed and makes sad “awwww” noise.

     
  • Lee 11:18 pm on February 7, 2011 Permalink | Reply  

    Explanation Questions 02.07.2011 

    Space squid of doom!

    Explain (in a nutshell) your code, structure, logic, important parts.
    The logic behind our code structure is built around the states of our creature. Whether it’s happy, neutral or upset. We identified the levels of brightness in which each state should be active. When the creature is in full darkness it is most content, if it stays in the state for determined length of time it will go into bliss mode. If the creature is in shadow, so mostly in darkness it’s neutral, if it starts getting lighter it gets upset. While upset it’s vocalizations will increase in pitch and tempo based ont he length of time it is in light and how bright it is. If it stays int he light too long it will die. Once dead the creature needs to be placed in full darkness for a length of time for it to revive.

    What did you do you feel is new, non-obvious, and useful.
    What we accomplished that’s new/useful is creating tones and vocalizations that can be increased in tempo and pitch to indicate in a kind sliding scale how happy or sad the creature is before reaching it’s extreme states of bliss and death.

     
  • Lee 5:17 pm on February 7, 2011 Permalink | Reply  

    SPACE SQUID OF DOOOOOOM!!!! 

    So my Beep Boop creature is a squid. He loves the dark and hates the light. He’ll increasingly beep faster the longer he’s upset until he dies. He can be revived by being immersed in full darkness for a little while. He’ll get more excited the longer he’s in the dark.

    ::BONUS::When he’s upset his eyes will blink red as well.

    #include "pitches.h"    //list of the frequencies of most notes
    int counter=0;
    
    int photoPin=0;
    int speaker=6;
    
    
    //the reading must be bellow each of these values to ellicit that emotion
    int excitedPoint=120;
    int neutralPoint=180;
    //higher than neutral results in dying
    
    int reading;  //holds the current photo reading
    String state="neutral";
    
    //using resistor: gold, red, green, brown
    
    boolean dead=false;
    int reviveCounter=0;  //counts how logn the dead creature has been in darkness
    
    // These are for the LED eyes
    const int ledPin =  13;
    int ledState = LOW;             // ledState used to set the LED
    long previousMillis = 0; 
    long interval = 1000;
    
    void setup(){
      Serial.begin(9600);
      pinMode(ledPin, OUTPUT);
    }
    
    void loop(){
      noTone(speaker);
      //checks to see what state the creature is in
      reading=analogRead(photoPin);
    
      if (readingexcitedPoint && readingneutralPoint && state!="screaming"){
        counter=0;
        state="screaming";
      }
    
      //Deal with the various states
      //is it dead?
      if (dead){
        Serial.println("DEAD");
        if (random(100)==0)
          PlayDeathGasp();
        interval = random(100,1300);
        RedEye(interval);
    
        //if it is in darkness logn enough, it should revive
        if (reading100){
            Serial.println("CHECK IT");
            //wait a few seconds between playing bliss sound
            if (counter%200==0) {
              PlayBliss();
            }
          }
          else if (counter%20==0){
            //if not, keep upping counter and play the exciting 
            PlayExcited();
          }
        }
    
        if (state=="neutral"){
          if (counter==1){
            PlayNeutral();  //play the sound
          }
          //if it's been neutral for a while, make sure some time passes between making sounds
          //then play it randomly
          if (counter>200){
            if (random(0,100)==0)
              counter=0;  //reset counter
          }
        }
    
        if (state=="screaming"){
          if (counter%20==0)
            PlayScream(); 
          interval = 500;
          RedEye(interval);
          if (counter>100){
            PlayDying();
            dead=true;
          }
        }
      }
    
      Serial.println(state);
      counter++;
      Serial.println(analogRead(photoPin));
      //Serial.println(counter);
    }
    
    void PlayNeutral(){
      //neutral tone sare played in a series of two.
      int notes[]={ 
        NOTE_D4, NOTE_B3, NOTE_A3, NOTE_F3, NOTE_DS3, NOTE_CS3                  };
      int start=random(0,2) *2;
      for (int i=start; i<start+2; i++){
        tone(speaker, notes[i]);
        delay(500);
        noTone(speaker);
        delay(300);
      }
    }
    
    //"I'm bursting with joy!"
    void PlayBliss(){
      //oscilate between two ranges that keep moving up
      //originaly 512
      int startVal=512;
      int endVal=860;
      int range=100;
      int val=startVal;
      int incr=random(1,3);
    
      while(val<endVal){
        //send it up
        int tempMax=val+range;  //how far up to go with this pass
        for (val; valtempMin; val-=incr){
          tone(speaker, val);
          delay(3);
        }
      }
    
      //hold the last value for a little while
      delay(500);
    }
    
    void PlayScream(){
      int scream[] = {
        NOTE_B4, 0, NOTE_G4, 0, NOTE_E4, 0, NOTE_D4                  };
      int screamDurations[] = {
        4,16,4,16,4,16,1                  };
    
      for (int thisNote = 0; thisNote endVal; i--){
        tone(speaker, i);
        delay(6);
      }
    
      //now create two beeps.
      noTone(speaker);
      delay(200);
      tone(speaker, 300);
      delay(500);
      noTone(speaker);
      delay(200);
      tone(speaker, 200);
      delay(500);
    }
    
    void PlayExcited(){
      int levelAdjust=map(reading,0,excitedPoint, 300,0);
      int toneA=NOTE_B4+levelAdjust;
      int toneB=NOTE_G5+levelAdjust;
    
      int counterAdjust=map(counter,0,100,0,40);
    
      for (int i=0; iendVal; i-=30){
        tone(speaker,i);
        delay(30000/i);
      }
      noTone(speaker);
      delay(500);
    
      //a few little burbles
      for (int i=0; i<3; i++){
        PlayDeathGasp();
      }
    }
    
    //Burbles and gurgles
    void PlayDeathGasp(){
      tone(speaker, random(50,70));
      delay(random(500,1000));
      noTone(speaker);
      delay(random(500,1000));
    }
    
    //"I'm coming back to life!"
    void PlayRevive(){
      int startVal=50;
      int endVal=NOTE_D5;
    
      for (int i=startVal; i<endVal; i+=30){
        tone(speaker,i);
        delay(30000/i);
      }
      noTone(speaker);
      delay(500);
    
      for (int i=0; i interval) {
        // save the last time you blinked the LED 
        previousMillis = currentMillis;   
    
        // if the LED is off turn it on and vice-versa:
        if (ledState == LOW)
          ledState = HIGH;
        else
          ledState = LOW;
    
        // set the LED with the ledState of the variable:
        digitalWrite(ledPin, ledState);
      }
    }
    
     
  • Lee 6:38 pm on February 3, 2011 Permalink | Reply  

    Beep Boop Lee 

    The peizo I have sounds pretty poor at all octaves unfortunately. There’s hardly any discernible difference between notes and this translates even worse being picked up by my computers microphone. Ah well, check out the video and my code is posted below.

    #include “pitches.h”

    // notes in the melody:
    int hello[] = {
    NOTE_F5, NOTE_G5, NOTE_A5, NOTE_B5, NOTE_C6,0, NOTE_A5,0,0,0};
    // note durations: 4 = quarter note, 8 = eighth note, etc.:
    int helloDurations[] = {
    16, 16, 16, 16 ,8,4,4,1,1,1};

    int goodbye[] = {
    NOTE_E4, NOTE_D4, NOTE_C4, 0,0,0};
    int goodbyeDurations[] = {
    2,4,1,1,1,1};

    int happy[] = {
    NOTE_E7, NOTE_D7, NOTE_A7, NOTE_D7, NOTE_A7, NOTE_D7, NOTE_A7, NOTE_G7,0,0,0};
    int happyDurations[] = {
    8,16,16,16,16,16,16,2,1,1,1};

    int sad[] = {
    NOTE_B4, 0, NOTE_G4, 0, NOTE_E4, 0, NOTE_D4,0,0,0};
    int sadDurations[] = {
    2,4,2,4,2,4,1,1,1,1};

    int yes[] = {
    NOTE_CS7,0,NOTE_E7,0,0,0};
    int yesDurations[] = {
    8,16,8,1,1,1};

    int no[] = {
    NOTE_DS5,0,NOTE_DS5,0,0,0};
    int noDurations[] = {
    8,16,8,1,1,1};

    int dyeing[] = {
    NOTE_AS4, NOTE_E4, NOTE_AS4, NOTE_E4, NOTE_AS4, NOTE_E4, NOTE_AS4, NOTE_E4, NOTE_AS4, 0,0,0};
    int dyeingDurations[] = {
    8,8,8,8,8,8,8,8,8,0,0,0};

    void setup() {
    // iterate over the notes of the melody:

    for (int thisNote = 0; thisNote < 10; thisNote++) {
    int helloDuration = 1000/helloDurations[thisNote];
    tone(8, hello[thisNote],helloDuration);
    int pauseBetweenNotes = helloDuration * 1.30;
    delay(pauseBetweenNotes);
    }

    for (int thisNote = 0; thisNote < 6; thisNote++) {
    int goodbyeDuration = 1000/goodbyeDurations[thisNote];
    tone(8, goodbye[thisNote],goodbyeDuration);
    int pauseBetweenNotes = goodbyeDuration * 1.30;
    delay(pauseBetweenNotes);
    }

    for (int thisNote = 0; thisNote < 11; thisNote++) {
    int happyDuration = 1000/happyDurations[thisNote];
    tone(8, happy[thisNote],happyDuration);
    int pauseBetweenNotes = happyDuration * 1.30;
    delay(pauseBetweenNotes);
    }

    for (int thisNote = 0; thisNote < 10; thisNote++) {
    int sadDuration = 1000/sadDurations[thisNote];
    tone(8, sad[thisNote],sadDuration);
    int pauseBetweenNotes = sadDuration * 1.30;
    delay(pauseBetweenNotes);
    }

    for (int thisNote = 0; thisNote < 6; thisNote++) {
    int yesDuration = 1000/yesDurations[thisNote];
    tone(8, yes[thisNote],yesDuration);
    int pauseBetweenNotes = yesDuration * 1.30;
    delay(pauseBetweenNotes);
    }

    for (int thisNote = 0; thisNote < 6; thisNote++) {
    int noDuration = 1000/noDurations[thisNote];
    tone(8, no[thisNote],noDuration);
    int pauseBetweenNotes = noDuration * 1.30;
    delay(pauseBetweenNotes);
    }

    for (int thisNote = 0; thisNote < 12; thisNote++) {
    int dyeingDuration = 1000/dyeingDurations[thisNote];
    tone(8, dyeing[thisNote],dyeingDuration);
    int pauseBetweenNotes = dyeingDuration * 1.30;
    delay(pauseBetweenNotes);
    }
    }

    void loop() {
    // no need to repeat the melody.
    }

     
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