Updates from November, 2011 Toggle Comment Threads | Keyboard Shortcuts

  • Yury Gitman 7:28 pm on November 11, 2011 Permalink | Reply  

    Schedule for Rest of Semester 

    Oct 11:   LOL homework,
    Make  an enclosure of your screen LOL that diffuses the light. Create software that uses dynamic scrolling text and a interactive activated animation.
    Buy second Arduino

    Nov 18:   Show twitting Displays, Homework.  Pulse Sensor and Sound group present.
    Make either:  A project the displays the HeartRate in a physical form (can be LOL)  OR  Make a Sound Message Box with 2-3 switches and 2-3 LED’s.

    Nov 25:  Thanks Giving No Class

    Dec 2:    Present Homework.  Do the second assignment.

    Dec 9:   Present prototypes for review.

    Dec 16:  Presentation 2 project to guest crits.

  • Yury Gitman 5:53 pm on October 8, 2011 Permalink | Reply
    Tags: , , cookbook, homework,   

    Arduino Cookbook Reading/Homework 

    Come to Oct 7th’s Class having done and read:

    Review: 1.1-1.5   [Read it for what you don’t know]

    Variables Introduced:  2.0-2.2

    Doing Math to Variables: 3.0-3.2

    Serial Comm Intro: Read 4.0 and don’t worry if over your head. Do pay close attention to 4.1.

    More Fun with Variables, Relational Operators: 2.17

    *Switches Intro, with Pull-Up Resistor and De-bouncing: Read 5.0 and 5.1, Do 5.2 and 5.3

    “If” and “Else If” Statements Intro: 2.12

    *”While” and “For” Loop: Pages 2.13, 2.14


    Come to Oct 14th’s Class having done and read:

    2.4:   Arrays Introduced (for Switches and LED’s)

    2.10:   Functions: Pages

    7.1:  LED’s Introduced and Reviewed

    7.6:  Making Knight Rider

    2.15-2.16:  Break and Switch Case:

    5.4:   Switches Intermediate:

    2.19, 2.21:  Logical Operators on Variables:


    1)  Change LED Blink Delay based on Amount of time Button is pressed.

    2)  Make 6 Different Light Sequences with  3-4 Switches and 4 LED’s.  Use Logical Operator, Knight Rider Effect, Functions and/or Switch Cases.


    Come to 21st’s Class having done and read:

    Reading Analog Values: 5.6,

    Map Function: 5.7

    Sensor: 6.0-6.3

    LED Fading, Color, and Control: 7.0, 7.2, 7.4, 7.5, 7.6



    Show 7.4 and 7.5 in Class.

    • hirumi 4:21 pm on October 14, 2011 Permalink | Reply

      Most useful/valuable exercises:
      I found that using the serial input to be the most useful exercise from the homework. It was gratifying to see the computer communicate with the arduino. Functions was a useful read because it made my code more modular and clean.

      Most difficult:
      Both switchTime sketches made me want to bash my head into a wall. I couldn’t get them to work to save my life. I kept getting errors even though it seemed like I had copied the examples exactly from the book. I’m not sure if there was a typo, or if there was some sort of additional code I was supposed to know to include, but regardless I couldn’t troubleshoot the issue.

    • noadol 4:24 pm on October 14, 2011 Permalink | Reply

      Most useful and valuable:

      Functions && Logical Operators on Variables.

      These two exercise really pushed my understanding of code structure
      and expand my options to control conditions.

      Most difficult and confusing:

      (5.4) Determining How Long a Switch Is Pressed:
      I could get the code text and structure, but I was confused about what it’s supposed to do or how it’s functions.. I’m not sure I got the point of this assignment, meaning I won’t be able to apply it and develop it in other projects.

      Formatting Serial Communication:
      It was very technical, a lot of new expressions I’m not sure what’s their value (e.g. ASCII, BYTE, BIN..).

    • mayaweinstein 4:24 pm on October 14, 2011 Permalink | Reply

      I found the section on breaks helpful. It’s good to know how to break a for loop without ending the function. I also found the section on RGB led’s helpful, it was a good introduction on how to use RGB led’s.
      I was really confused by the section covering the switch-case function. I understand what a function is and how it works but I did not understand what was being accomplished through the use of the switch-case. I was completely lost when it came down to the bitwise operations. I have no idea why you would be working with what looked like binary code in arduino. I’m not sure exactly what the code was trying to do or when you would actually use it.

    • Catalina Cortazar 4:25 pm on October 14, 2011 Permalink | Reply

      The codes I found more difficult and confusing were the following:

      The example blink3 on the function part. The function that needs a parameter and gives 1 return value. I couldn’t get it to work at home and also don’t understand how and when do we call the function. Do we need to call it from inside the void loop?

      Another thing that I still found confusing is the pull up button. They always start HIGH ? How do we do it to turn the light off, or maybe is there a way to change the state of the button?

      I also don’t understand what the value >>= 2; means (shift value right to places)

      Most useful or valuable

      The most useful and valuable thing I found was the use of arrays in order to declare more than one element. I also think it’s useful the logical operators and comparison, in order to give “instruction” to what and when to do something.

      Another thing I found useful is the use of break;
      specially when we have lots of information and we don’t want to use infinitive number of if, else if commands.

    • mónica arias. 4:25 pm on October 14, 2011 Permalink | Reply

      – Both sections regarding logical operators on variables. I had never seen it explained in so much detail, but at the same time in a concise way. They weren’t exercises per se, but it was one of the most helpful chapters. (2.19, 2.21: Logical Operators on Variables)

      – 2.4: Arrays Introduced (for Switches and LED’s): The book makes a fine job explaining it, so it might be just a personal issue I have against arrays in general.
      – 2.15-2.16: Break and Switch Case… yeah. I understood the concept, BUT I still don’t feel comfortable explaining it, or doing it. But hey, isn’t experimentation key? I’m sure that if I spend more time on it, I would eventually get it.

    • dss49 4:26 pm on October 14, 2011 Permalink | Reply

      I guess I neglected some of the reading although I found a very helpful tutorial online that sort of walked me through basic input/output using buttons and LED’s. (I’ll be sure to stay on top of it in the future). The link can be found at http://www.ladyada.net/learn/arduino/lesson5.html.

      Essentially they create a problem set starting with basic switch functions… helping build the code ground up for recognizing change in state and output controls. Towards the end they give you a series of problems involving a Bike company that needs help programming a new lighting system. The various stages of the prompt test your abilities and end with the creation of a light system which has 4-5 separate modes activated by the button. This piecemeal way of learning was personally very helpful.

      There were a number of other tutorials that I found helpful, one of which explained the use of millis() instead of delay(). By using millis() as a timer instead of delay(), one is able to nest other functionality within conditionals that otherwise would not be able to run with delay() since delay() stops all processes within the Arduino. A notable example would be having one LED blink 500ms after another has started blinking, creating a sort of Lag effect. Using delay() would prevent you from activating another LED while the former is being delayed. Another use of millis() was creating a stopwatch which blinks as a timer begins… the push of a button turns the timer off, the start and end times are calculated as Serial.println spits out the time.

      • dss49 4:28 pm on October 14, 2011 Permalink | Reply

        debouncing was helpful as well.. making sure both readings of the input were consistent.

    • yonglee2011 4:27 pm on October 14, 2011 Permalink | Reply

      Two Exercise that I like or helpful:
      The custom function for different Blinks are good sample of diverse options we can use. I wish the codes are more detailed, so it is easy to follow on the Arduino. I type the code from the book, but the code didn’t work.

      Conditional section show diverse conditional options. But I wish the conditional section has more sample codes.

      Difficult exercise:

      There are some samples of using arrays. I played with Arrays, and wish there are more samples to look up. I found the book is helpful, but it seems it doesn’t have depth details.

      I really like what While and For Loop do, and wish there are more exercise to help a stater to understand the concepts and samples.

    • mrcansler 4:27 pm on October 14, 2011 Permalink | Reply

      The two readings I found most interesting were 2.10 (Functions), and 2.19 (Logical Operators). Until this point, I was unaware that functions even existed within this programming environment, and they appear to be a useful resource when constructing larger sections of code later. The logical operators sections was useful, as they are actually very basic concepts, but I was not particularly familiar with these basics. Still feel like I’m playing catchup with Syntax.

      I had some difficulty with arrays, as I feel like I completely get them structurally, but whenever I try to implement them I always seem to mess up the for loops associated with counting through them. I’m also having a bit of trouble digesting 2.16 “Switch”, and figuring out when to use these vs if/else statements. Is there a specific number of inputs before it’s best to use SwitchCase?

    • Aneta Genova 4:27 pm on October 14, 2011 Permalink | Reply

      I found most useful the array reading and exercise.It makes working with many variables extremely easy and certainly shortens the code. I developed a project about bouncing animals in a field and the array list was the easiest way to do them.

      I found very easy the functions reading and exercise. The first exercise about blinking and delay was very familiar to sketches we’ve done in class.

      I found challenging the logical operators and logical comparisons and I definitely get confused when we get to compare strings. I was not able to do that assignment.

    • jasonkim1006 4:27 pm on October 14, 2011 Permalink | Reply

      1. Which two exercises or code did you find most useful or valuable from the reading? Be as specific as possible.

      a) The first code I found to be very useful was the case / break code. It was really interesting to get input from the serial monitor and make the LED blink.
      char ch = Serial.read();
      case ‘1’:
      Serial.println(“blink once!”);
      for(int i = 0; i<4; i++){

      Using default, we can set the default input and by using the switch case, we can use any key on the keyboard to create an input and make, for example, an LED blink sequence. Just by using the case '1':, case '2':, etc. we can determine how many different types of sequences we want.

      b) The second code I found very useful were using logical operators such as and (&&), or (||), and not (!). By using logical operators, we can determine diverse situations such as if both switches are pressed, both the switch and the tilt sensor are sending input, either the first button or the last button is pressed, etc. By including logical operators, there can be so many different types of situations with just four buttons. Instead of making one button do one thing, we can make a combination of one, two, three, or four buttons to something else. The logical operators are also good for setting up boundaries or giving certain conditions to inputs.

      2.Which two exercises or code did you find most difficult or confusing from the reading? Be as specific as possible.

      a) The first code that was really difficult to understand was calculating the amount of time using the switchTime() function. It was really hard to understand because whenever I tried it, the counter would increase rapidly or even decrease to a high negative number. I want to try using the "long" and "millis()" more so that I can understand its concept better. Because we used pullup resistors inside the Arduino, the HIGH and LOW was also a bit confusing to understand. The state should be inverted when using different resistors.

      long switchTime(){
      static unsigned long startTime = 0;
      static boolean state;

      if(digitalRead(inPin) != state){
      state =! state;
      startTime = millis();
      if(state == LOW){
      return millis() – startTime;
      return 0;

      b) Related with the switchTime() function is the debounce code. It took me a long time to understand the debounce code by using booleans of state and previousState. I think it was especially hard to understand because the debounce does not actually give direct feedback. Switch codes worked without having to use the debounce code and therefore it was at first hard to understand what "debouncing" actually did to my code. Later did I find out it was just a check for a few milliseconds to see if the button was stable enough to input and output information. It was a comparison between the current state and previousState and to see if they were equal.

    • litchirhythm 4:29 pm on October 14, 2011 Permalink | Reply

      ● The most useful exercise would be 5.4, the switch timer, for sure. It shows how to use timing (millis() function) to count how long you push the button and make led lit up in relative amount of time.

      And the other one that is interesting is 2.16 on the ‘switch’ logical command which I never know before. It function can be written with a long list of if statement but switch can be really handy on another person (or yourself) to read and understand the code much easier.

      ● The most difficult would also be the 5.4, the switch timer, since the first homework assignment is to tweak this one to make it blink. So I have to know this code inside out to be able to tweak it. In it, I have to apply the concept of custom function that count the time and return the data back to the main loop (the concept from 2.10 the function block), It’s like a wrap up of all exercises.

      Another thing that I find most difficult is Array (2.4). Even we have saw some of them on the example we work on. But to read and understand all of the concept and remember the syntax so that I can think and make it to work in the way I want is still hard. Because you’ll have to use a for loop to run the arrays all the time. But I think I understand it much more now.

    • josefayala 4:33 pm on October 14, 2011 Permalink | Reply

      I liked the vast majority of the tutorials. My favorite was Arrays because in the past I have not been able to properly execute them. There is something gratifying about making 100 ellipses with 3-4 lines of code (otherwise we’d have to hard code each ellipse). With regards to Arduino work it’s nice to know that I can call on a group of pins for one purpose by simply calling an array. What I was surprised to find out is that the array can hold a string of characters. I found that character strings are good possibly for Serial Monitor work. Functions were also a good time, and it was good to get a good look at the use of parameters and returns.

      Switch statements can be difficult, but overall the concept is well embedded into my mind. I understand the importance of using breaks within a switch command but kind of miss the logic of setting it up with what seem to be all the arguments wrapped between the switch (I guess from the purpose of switching). Is it comparable to an array ? Who knows…I guess I have to re-read it.


    • aisencc 5:02 pm on October 14, 2011 Permalink | Reply

      10/14 Reading Assignment Response
      The easiest sections from the readings were the Arrays Introduced and Logical Operators. Both of these sections are reviews to the Processing and Arduino IDEs. Both of these sections seemed a bit redundant, since it is crucial to know these in order to create any functions or when working with a variety of pins that are programmed to do similar things. For the homework assignment I used both of these methods in structuring my code. Every time I use these

      The most challenging chapters were Determining How Long a Switch is Pressed and Knight Rider. These are not necessarily hard to understand, but more dense than the practical sections I mentioned above. The Knight Rider was not complicated, but it was dense. Understanding arrays makes this section easy, because the use of for loops with the right amount of delay HIGH and LOW patterns is what makes the LED pins blink one at a time. Determining How Long a Switch is Pressed was the most challenging section of the homework because it introduces a counter and functions. I am still having to read it over and over again, to try to understand exactly what it’s doing.

  • Yury Gitman 2:50 pm on February 24, 2009 Permalink | Reply  

    Student Lecture Sections 

    Structure:  Void Setup, Void Loop,
    Functions:  pinMode, digitalWrite, digitalRead, analogRead, analogWrite,
    Syntax:   (semicolon),{} (curly braces),// (single line comment)
    /* */ (multi-line)

      HIGH/LOW, INPUT/OUTPUT, true/false,

    Arithmetic Operator:
      =, +, -, *, /, %
    _____Kristen, Cecilia,___________________2/17/09_
    Toggle Switches and Momentary Buttons [Types, Places, Installing]
    Control Structure:  Debounce,  If, If…else, For, While, Do While, Break, Continue, Return.
    Comparison Operators:  ==,!=, <,>,<=,=>
    _3_____Steve, Thai, Bruce_________________2/24/09_
    AnalogWrite, PWM, Fading LED's, 

    Multiple LED's via PWM, Tri-Color LEDs

    Cases, Switch Case, goto

    _4_____Ira, Paola, _______________________3/24/09_
    Analog I/O
    Potentiometers. Faders-From Sparkfun.
    Analog Input, Calibration, Fading, Smoothing
    POT Control of LED's
    _5_____Kristen, Cecila, Joe ________________3/27/09_
    IR Sensors,
    Calibration, Smoothing,  Control LED and Speaker via IR Sensor

    _6____Paola, Ira________________________3/20/09_
    Control Speaker via IR sensor, Play Melody

    _5.5___Katherine, Myriam ________________3/17/09_
    Ultra-Sound Sensors
    Calibration, Smoothing
    Control LED and Speaker via IR Sensor

    _7____Kathrine, Nick, Bruce_______________4/3/09_
    Alcohol Sensors
    Hardware, Inputting Values, Inputting Values, Control Lights

    _8____Steve, Nick, Joe__________________4/10/09_
    Capacitance Sensing Library Via Arduino
    Code, Reading Values, Controlling LED's and Speakers.

  • Yury Gitman 8:21 pm on January 29, 2009 Permalink | Reply  

    Schedule – Spring 2009 Semester 

    27    First Day
    30    Sign-up To Blog, Review Parts to get and where/how, Install operating system. Do homework Hello World, Hand-out Arduinos

         Show Home Work. Discuss LED's, Lumi's Viewing Radius. Find LED
    time-pieces, blog them. Make a series of LED's fire. Explore Time and
    Squence in Code. Explore Position in Space for Effect. Assign Student
    6      Student Lectures Begin. Topic and Homework -  LED Light and Time, Resisters, Series/Parallel.
    10    Student Lectures.  Topic and Homework -  LED Light and Time- PWM and general construction and material effects.
    13    Movie Theremin
    Attend Toy Fair 15-18th. Blog 3 items you liked there. Include photo,
    name, maker's name, and one paragraph of why you like it.
    20    Show LED light Projects – Crit
    24    Student Lectures.  Topic and Homework – Order Speakers and other parts. Sound, Speakers, IR sensors, Ultra-sonic sensors
    27    Student Lectures.  Topic and Homework – IR sensors, Ultra-sonic sensors, Feedback via LED's

    3     Student Lectures.  Topic and Homework – More on IR sensors, Ultra-sonic sensors, Feedback via LED's
    6      Student Lectures.  Topic and Homework – Sound and Music Feedback via Speakers, PWM
    10    Student Lectures.  Topic and Homework – Sound Resonance in Material. Prototype 1
    13    Student Lectures.  Topic and Homework – Prototype 2
    16 to 22    Spring Break
    24    Project Crits, Prototypes 3
    Electro-Plush, Sewing and Plush Fabric/construction- Focus on
    Fabric/Stuffing, Blog 3 Characters you like. Never the same twice.
    Electro-Plush, Sewing and Plush Fabric/construction-  Focus on
    Enclosures, Research Other Elecro-Plush, Find 3 and Describe why.

    3     Electro-Plush, Prototype 1
    7     Electro-Plush, Prototype 1 — User Play-Testing
    10   Electro-Plush, Prototype 2
    14   Electro-Plush, Prototype 3– User Play-Testing
    17   Electro-Plush, Prototype 4
    21   Holocaust Remembrance Day
    24   Electro-Plush, Clone and Network
    28   Electro-Plush, Clone and Network– User Play-Testing

    1     Labor Day  Clone and Network
    5     Electro-Plush, Prototype 4– User Play-Testing
    8     Electro-Plush, Prototype 4
    9 & 10     Reviews for Major Studio
    12           Last Day of Class. Individual Reviews.
    16t-17     Thesis Reviews
    18   Classes and exams end.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc