Arduino Button Assignment 3

Digital Input/Serial Monitor

After following the code in the lesson, I was able to use the button to both turn the light on and off with the push. Below is one video showing this:

https://www.instagram.com/p/BZcLjAclLoP/?taken-by=antya_antje

Second, together with Carly, and with the help of Hannah, we were able to create a sketch code that faded the light to a higher fade speed when the button was pressed. This one was much more challenging to figure out because we weren’t entirely sure where to change the code but knew it had to go somewhere in the loop and with the button “if” statement. We finally figured it out:

https://www.instagram.com/p/BZcMeICFEYZ/?taken-by=antya_antje

Here is the coding:

int led = 9;           // the PWM pin the LED is attached to
int brightness = 0;    // how bright the LED is
int fadeAmount = 1;    // how many points to fade the LED by
const int buttonPin = 2;     // the number of the pushbutton pin
const int ledPin =  9;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

// the setup routine runs once when you press reset:
void setup() {
  // declare pin 9 to be an output:
  pinMode(led, OUTPUT);
   // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}


void loop() {

  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) { 
    //if the button is pressed,increased fade amount by 1
    fadeAmount = fadeAmount + 5;
  }

  // set the brightness of pin 9:
  analogWrite(led, brightness);

  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade:
  if (brightness <= 0 || brightness >= 255) {
    fadeAmount = -fadeAmount;
    
  }
  // wait for 30 milliseconds to see the dimming effect
  delay(30);
  
}

 

Teardown – Remote Controlled Car

Remote Car Teardown from Antya Waegemann on Vimeo.

The car teardown was super interesting and fun. It was a little difficult at first to figure out what every was. It seems as though the materials used to make it were rather simple including the circuit board, wiring, small motors, batteries, and then the plastic to make the mold of the object.

The only tools I needed for the teardown were a small screwdriver, a larger screwdriver and then some scissors to cut the wire to separate everything, but it was rather easy to take apart and seems like a lot of glue was used as well.

Two design elements that interested me about this product was first the simplicity of it. It looks really complex especially as a remote control car, but taking it apart showed me that it really didn’t have too many components. Another design aspect that interested me was the motors and it would be interesting to see how the work and how it all connects, almost as if I could have a translucent car.

teardown2-01teardown1-01

 

Hi, I’m Antya

13507225_10105069100299169_6859139816996861338_n

Hello! I’m Antya Waegemann and I grew up outside of Boston, Massachusetts. I spent the past 4 years working for a research project hosted at the Harvard Graduate School of Design, called Transforming Urban Transport – The Role of Political Leadership (TUT-POL). I have also worked at various museums as a curatorial assistant, and managed a small NY retail company’s e-commerce back in 2011, which was my first exposure to Shopify and WordPress and the world of websites. I received a Bachelors from New York University in Environmental Studies with a focus in cities and transportation, a Masters in Sustainable Management with a focus in business and policy, and took some graphic design courses as the School of the Museum of Fine Arts in Boston. I enjoy exploring the city, making things, am a Netflix binger, and usually spend most of my time eating or dreaming about ice cream.

You many find some of my graphic design work and a little bit about my Masters thesis on my website: http://antyawaegemann.com/