Week 5

Class 9 – Intro to Drawing with Processing

Readings:

  • Getting Started with Processing: Chapter 1 – Hello
  • Getting Started with Processing: Chapter 2 – Starting to Code
  • Getting Started with Processing: Chapter 3 – Draw
  • Learning Processing: Chapter 1 Pixels
  • Learning Processing: Chapter 2 Processing

Discussion:

  • Programming, Processing & Drawing

 

Class 10 – Animation in Processing

Readings:

  • Learning Processing: Chapter 4 Variables
  • Getting Started with Processing: Chapter 4 – Variables
  • Learning Processing: Chapter 5 Conditionals
  • Learning Processing: Chapter 6 Loops
  • Learning Processing: Chapter 7 Functions

Discussion:

  • Animation, Variables and Loops

Stupid Pet Trick

Working individually, make a simple physically interactive device that uses the skills you’ve learned in class. It must respond to a physical action or series of actions a person takes, and it must be amusing, surprising, or otherwise engaging. It doesn’t have to be practical, or complex, as long it shows that you understand the basics of digital and analog I/O and how to use them.

If you’re unfamiliar with the term “stupid pet trick,” Googling the term may provide you inspiration for the tone of this project.

Document your work on the documentation blog, including all the components you used for your project, the code you used and the process you followed. Make sure to write a conclusion about your project, whether you achieved your goal or still extra work should be done. During Friday’s recitation, you will be presenting your work to the class.

Week 4 – Project Planning and Stupid Pet Trick

Class 7 – Project Planning

Readings:

Discussion:


  • Project Production and Prototyping

Class 8 – Workshop

Discussion:

  • Work on your stupid pet trick.

Recitation 3 – Sensors

PART A:


For Part A, please find a partner and work in pairs.


Step 1: Choose one of the the following sensors—not provided in your Arduino kit— and read about it. Information about the individual sensors and how to use them can be found in the Information on Sensors and Resources section at the bottom of the post.

Once you have picked a sensor, attach it to your Arduino and use the data from your sensor to turn an output (Servo-motor, LEDs, Buzzer, etc.) on and off.


Step 2: Document the work you have done to the blog. Make sure to document your work individually, and that your documentation responds to the following questions:

  • What did you intend to assemble? Why did you choose that specific sensor and output?
  • Which materials did you use? Which circuit(s) did you use as a reference for them?
  • What sources did you use in order to program them? Did you have to modify them?
  • Which different steps you went through to make it work? Did it work as expected?
  • What conclusions can you draw over the work you did?
  • Can you relate your experience building this circuit to any device you interact in your daily life?
  • If you were to continue experimenting, what would your next steps be?

PART B:

 

For this part, you should work individually focusing in the work you have done in Part A. You should post a reflection that addresses the following questions:

  • How is writing code similar to making dumplings?
  • As Manovich describes in the Language of New Media, the influence of computers on new media is clear. In what ways do you believe the computer influences our human behaviors?


Additional Information on Sensors


Moisture Sensor:
The Moisture Sensor can be used as if you were doing simple Analog Read (like the potentiometer from Recitation 2) with any analog device. This is to say, connect the sensors’ power and ground pins to the Arduino’s power and ground, respectively. The signal pin from these sensors can be connected to an Analog Input pin.
Infrared Distance Sensor (IR Proximity Sensor):
Similar to the Moisture Sensor, the Infrared Distance Sensor can by used by implementing the connections and code from a simple Analog Read Sketch. In the case of Infrared Distance Sensors, using the “map()” function can be helpful. This function maps the analog readings from the sensor to the distance between the sensor and the object it is sensing. For the Sharp Infrared Distance Sensor you can also follow the sample code available here.
Vibration Sensor:
To create a Vibration Sensor you will need a piezo disk and a 1M resistor. You can use the Knock example on your Arduino IDE — under Examples —> 0.6Sensors. Otherwise, the Vibration Sensor can be used like a simple Analog input.
Ultrasonic Ranger:
The Ultrasonic Ranger (AKA Ultrasonic Sensor OR HC-SR04) can be used to detect distance. To program Arduino to work with this sensor, you can use the Ping example on your Arduino IDE — under Examples —> 0.6Sensors.
Note: In order for the HC-SR04 to work with the Ping code, you must connect both Trig and Echo to the same Digital Pin in your Arduino.
3-Axis Analog Accelerometer:
For the Grove 3-Axis Accelerometer (3-Axis Analog Accelerometer) you can use the ADXL3xx example on your Arduino IDE — under Examples —> 0.6Sensors.

Recitation 2 – Arduino Basics

Materials

  • 1 * Arduino Kit and its contents, including:
  • 1 * Breadboard
  • 1 * Arduino Uno
  • 1 * Buzzer
  • 1 * Push-Button Switch
  • 1 * LDR
  • 220 ohm Resistors
  • LEDs
  • 10K ohm Variable Resistors (Potentiometers)
  • 1 * USB A to B Cable
  • Jumper Cables (Hook-up Wires)

Exercise 1

These challenges will require you to build a circuit, write and Arduino sketch (code), and upload that sketch to your Arduino Uno. You may build your circuits based on the provided schematics and cheat sheet below. For both Part A and B, as you build your circuits, take pictures and write about your process . You can use the documentation lighting stations to take pictures or film the the finished circuit working. Record notes about the building process for each circuit, such as problems that you encountered, and how you fixed them. Reflect on the final outcome: Did the circuit work at the end? If not, why didn’t it? What needs to be altered for the circuit to work?

 

PART A (individual):

Step 1: Using a Pushbutton

Build a circuit based on the diagram below. When you have finished building this circuit, write a sketch that blinks an LED when the pushbutton is pressed. You may reference Arduino> File> Examples> Digital> Button for help writing the sketch. Remember that to make your sketch consistent with your circuit, you need to double check the pin numbers.

Step 2- Blinking an LED using a Pushbutton

Using the circuit you just assembled, write a sketch that blinks an LED when the pushbutton is pressed. You may reference to  Arduino> File> Examples> Digital> Button and Arduino> File> Examples> 0.1Basics> Blink for help writing the sketch.

 

Step 3: Fading an LED with a Pushbutton

Using the same circuit as the previous step, modify your Arduino sketch so that the LED fades when the pushbutton is pressed. You may reference Arduino> File> Examples> Basics> Fade for help writing the sketch.

 

Step 4: Make your own Circuit!

Build a circuit that can power at least 3 LEDs. Then write a sketch that blinks and/or fades these LEDs in a unique way. How the LEDs blink or fade is entirely up to you, but they should do so in an original sequence. Upload this sketch to your Arduino and record the results.

When you have completed this circuit, draw a schematic representation of what you made and take a picture. Upload your schematic along with the other documentation for this exercise.

 

PART B (in pairs):

Step 1: Fading an LED with a Potentiometer

Build a circuit based on the diagram below. When you have finished building this circuit, write a sketch that fades the LED in relation to the Analog values from the potentiometer. You may reference Arduino> File> Examples> Analog> AnalogInOutSerial for help writing the sketch.

 

Step 2: Multiple Outputs with Multiple Inputs

Now that you know how to create a project with multiple inputs and outputs, build a circuit that has at least three LEDs (buzzers optional) and three potentiometers. Write a sketch that has each of your inputs control an output (Outputs can be digital, analog, or some combination).

When you have completed this task, draw a schematic of the circuit your built and upload it to the blog along with the other documentation.

 

Exercise 2

Instructions:

Working individually, answer the following questions and post them to the documentation blog along with your work from Exercise 1.

  1. During the assembly of the circuits, we used many electronic components as inputs and outputs. Which components do you recognize in the city?
  2. If you have 100000 LEDs of any brightness and color at your disposal, what would you make and where would you put it?
  3. Which reflections about the nature of interaction can you make about the Figure I.1 in the Physical Computing reading?

 

Personal Assessment

(Not to be posted to the blog, only for your own reference)

Note: To answer these questions, you may refer to this weeks readings about, microcontrollers, digital input and output, analog input, and analog output, as well as Getting Started with Arduino. You can also take a look at the Arduino Reference page for further understanding.

Arduino Hardware

  • What is a development board? Why is the Arduino Uno a development board?
  • What is a microcontroller? What does a microcontroller do?
  • How many Digital Input/Output Pins does the Arduino Uno have? Which pins are they? What do they do?
  • How many Pulse Width Modulation (PWM) pins does the Arduino Uno have? Which pins are they? What do they do?
  • How many Analog Input Pins does the Arduino Uno have? Which pins are they? What do they do?

Arduino Software

  • What does “IDE” stand for? What software is used to write Arduino code and upload sketches to the Arduino?
  • What is the “setup()” function? What does the code within the setup() function do (i.e. What happens to code written within the setup() function?) ?
  • What is the “loop()” function? What does the loop() function do?
  • How do you “comment” within the Arduino IDE? Why is it good to comment within your code?
  • What does the “pinMode()” function do?
  • What does the  “digitalRead()”  function do? What does the “analogRead()” function do? How are they different?
  • What does the  “digitalWrite()”  function do? What does the  “analogWrite()” function do? How are they different?
  • What does the “delay()” function do?

Recitation 1 – Electronics & Documentation

Instructions:

Please carefully read the directions for each of the two exercises for this recitation. At the beginning of the recitation, per instructions from your recitation leaders, you may take materials necessary to build your circuits. When you have completed Exercise 1, upload all documentation for Exercise 1 and your answers for Exercise 2 to the IMA Documentation Blog.

Materials:

    • 1 * Breadboard
    • 1 * LM7805 Voltage Regulator
    • 1 * Buzzer
    • 1 * Push-Button Switch
    • 1 * 220 ohm Resistor
    • 1 * LED
    • 1 * 100 nF (0.1uF) Capacitor
    • 1 * 10K ohm Variable Resistor (Potentiometer)
    • 1 * 12 volt Power Supply 
    • 1 * Barrel Jack
    • Jumper Cables (Hook-up Wires)

Exercise 1

Step 1: Build your circuit

Directions: Working in pairs, create three simple circuits on a breadboard based on the circuit diagrams below. As you build your circuits, take pictures and write about your process. When you’ve finished a circuit, take pictures or film the the finished circuit working. Record notes about the building process for each circuit, such as problems that you encountered, and how you fixed them.

Note:

To help you read the schematics for the circuits, you may look at the components and their symbols at the bottom of this document, or refer to the diagrams in this reading.

Circuit 1

Circuit 2

Circuit 3

Step 2: Document your work

For your blog post, please upload your pictures and add the following information for each individual circuit:

    • Write down the list of components used. Record what these components are, what they do, and why they are included in this circuit.
    • Describe the process of building the circuit, and note what worked and what didn’t.
    • Write down how one interacts with the circuit. (i.e. What one must do to make the circuit work, or how one’s interaction changes the circuit’s output)
    • Reflect on the final outcome: Did the circuit work at the end? If not, why didn’t it? What needs to be altered for the circuit to work?

 

Exercise 2

Once you have finished your circuits, take time to reflect on this week’s readings and Exercise 1. Post your answers to the following questions to the blog along with your documentation for Exercise 1.

Question 1

After reading The Art of Interactive Design, do you think that the circuits you built today include interactivity? Please explain your answer.

 

Question 2

Based off of Electricity: the Basics, identify which components used today were sensors, and which components were actuators.

 

Question 3

How can Interaction Design and Physical Computing be used to create Interactive Art? You can reference Introduction to Arduino and Zack Lieberman’s video.

 

Components and Diagrams

Resistor:

Image from techversat.com

 

 

 

 

 

 

 

LED:

Image from Tweaking4All

 

 

 

 

 

 

 

 

 

 

Capacitor:

Image from Sparkfun.com

 

 

 

 

 

 

 

 

Voltage Regulator:

Image from Electronics4u

 

 

 

 

 

 

 

 

Variable Resistor / Potentiometer:

Image from hellasdigital.com

 

 

 

 

 

 

 

Push Button (Switch):

Image from Razzpisample

 

 

Speaker:

Image from Sparkfun.com

 

 

 

 

 

 

 

 

Power: 

Ground:

 

Week 3 – Physical Interaction

Class 5 – Conditionals and Variables

Readings:

Discussion:

  • If statements and variables with the Arduino

Class 6 – Physical Interaction, Sensors and Actuators

Readings:

Discussion:

  • Physical Interaction, Sensors and Actuators

Week 2 – Microcontrollers, Digital and Analog

Class 3 – Intro to Microcontrollers

Download Arduino IDE arduino.cc

Textbook: Getting Started with Arduino

  • Chapter 3 – The Arduino Platform

Readings:

Discussion:

  • Microcontrollers & Arduino

Class 4 – Digital, Analog, Arduino and You!

Readings:

Textbook: Getting Started with Arduino

  • Chapter 4 – Really Getting Started with Arduino
  • Chapter 5 – Advanced Input and Output

Discussion:

  • Digital & Analog Inputs & Outputs

Week 1 – Introduction, Electricity and Electronics

Class 1 – Introduction

Class 2 – Electricity

Textbook: Getting Started with Arduino

  • Chapter 1 – Introduction
  • Chapter 2 – The Arduino Way

Readings:

Discussion:

  • Electricity, Electrical Components & Circuits