Arduino Lesson 3

Adding a button! I carried many of the skills I learned last week over to this week.

View this post on Instagram

šŸŽ‰ #arduino #exercises

A post shared by Carly Simmons (@carlyjsimmons) on

Now, the button controls the fade!

View this post on Instagram

ā¬†ļø #arduino #exercises

A post shared by Carly Simmons (@carlyjsimmons) on

Thank you to my classmates Hannah and Antya, for assisting me with this exercise! Here’s the code we came up with…

/*
Fade with Button
*/

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);

}

 

Arduino Homework #1

Huge shout out to Wei, Xuan, Phoung Ahn, and Tzu Ching for helping me through these Arduino exercises and teaching me all about circuits, code language, and Chinese rap.

1) 5 LED Blink

2) F AĀ  DĀ  Ā EĀ  Ā  .

3) RBG LEDs

My First Teardown

For my first-ever teardown, I disassembled,Ā (and mildly destroyed) a Nintendo Wii remote. I only needed access to a few tools, which include a tri-winged screwdriver, a metal file (to level some of the plastic pieces), and an Olfa blade to help pry the device open.

What you’ll need:

  • tri-winged screwdriver
  • Olfa blade
  • File*

*Dependent on screwdriver

Ā Ā img_3908.jpgĀ  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā Ā img_3896.jpg

Ā  Ā  Ā  Ā  Ā  Ā  Ā (Left to Right: Tri-winged Screwdriver, File (Letterman Knife), Olfa blade)

First, examine the backside of the remote, and remove the battery cover, there are two small screws you will need to remove, with the tri-winged screwdriver located where each battery sits.

IMG_3898

Next, you’ll want to pry the two main pieces apart. Don’t do that just yet — you still have two screws to find. They can be found at the bottom of the remote, on the backside, under the two screws you have already removed.

*Pro Tip* make sure you have a narrow and long screwdriver to complete this task. The screws are encompassed by tall walls of plastic and are tough to get to.

I did not have the means to reach the screws initially and needed to take a detour. The photos below showcase the brilliant use of a metal file. The file was able to eat through the plastic fairly quickly and leveled the plastic, allowing me to reach the screws with my screwdriver.

This slideshow requires JavaScript.

Now, you can pry the remote into two pieces easily, like this:

IMG_3904

Look at those muscles!

IMG_3905

And here are all their names…

WIIMOTE

WIIMOTE BACK

In this particular device, all components on the circuit board are soldered.

In breaking down the components of the Wii remote, I particularly enjoyed the small rubber/ plastic bits that are placed between the external buttons (which we press) and the circut board. These pieces are a smart design decision because their flexible and soft qualities prevent any contact between buttons and the circuit board. Also, the experience of pressing a button, and the slight resistanceĀ that the soft pieces provide, is a feeling that gamers and non-gamers alike can joyfully relate to!

Similarly, the hinged plastic embedded in the back portion of the remote, used for pressing “B” with your index finger, is a smart design choice. The button is modeled after a trigger, which evokes a certain reaction during fictional play for gamers. Rather than insert a typical button, the hinge calls for a particular action from its user.

 

Hi! I’m Carly…

SVA_C_Simmons_Headshot…and I am part of the 2019 Product of Design program at the School of Visual Arts. I was born and raised in Canandaigua, NY, in the heart of the Finger Lakes, where I also completed a four year degree in Architectural Studies from Hobart and William Smith Colleges in Geneva, NY. Following graduation in 2016, I was able to feed my appetiteĀ for travel by visiting some new places in central and eastern Europe, and spent my summerĀ in a furniture maker’s wood shop honing my woodworking skill set. Prior to coming to NYC, I spent the last year in Boston, MA working in the field of graphic design. This fall I am excited to learn how to channel my design ideas through the world of Arduino! Follow me along the way on Instagram @memory_mapper and at www.carly-simmons.com!