K3 2007 - Body And Technology - contents
home - people - contents - location - FAQ
Mon |
Tue |
Wed |
Thu |
Fri | ||
|
36 |
morning | |||||
|
afternoon | ||||||
|
37 |
morning | |||||
|
afternoon | ||||||
|
38 |
morning | |||||
|
afternoon | ||||||
|
39 |
morning | |||||
|
afternoon | ||||||
|
40 |
morning | |||||
|
afternoon | ||||||
|
41 |
morning | |||||
|
afternoon | ||||||
|
42 |
morning | |||||
|
afternoon | ||||||
|
43 |
morning | |||||
|
afternoon | ||||||
|
44 |
morning | |||||
|
afternoon | ||||||
|
45 |
morning | |||||
|
afternoon |
Introduction
link: slideshow used for the presentation
[click on the pictures to see the information]
Session 1
link: slideshow used in the first lab
- Introduction to Arduino
- Install party: get the software running
- Basic Output examples: LED Blink
- Knight Rider exercise
- Using the breadboard
- Components: LED (polarity), resistor (ohms, no polarity), buttons
- Software commands: pinMode(pin, INPUT/OUTPUT), digitalWrite(pin, HIGH/LOW), delay(time), for(init;end;increment) {}, digitalRead(pin), if (statement) {} else {}
- Syntax: ;, {}, /* */, //
- Software structures: variable declaration, void setup(), void loop()
- Color coding: Red (voltage), Black (ground), others (signals)
- Digital values: HIGH - ON - 5V - 1 - TRUE // LOW - OFF - 0V - 0 - FALSE
- digital inputs: using a wire, using a button, using a pull-up resistor
- difference between assigning (=) and comparing (==)
- Recommended materials: Evan's programming booklet, Banzi's arduino booklet, installing arduino on Mac
Session 2
link: slideshow used in the second lab
- Software commands: for(init;end;increment) {}, if (statement) {} else {}, val = analogRead(pin)
- Components: LDR, NTC
- Circuits: basic resistive sensor connection
- Serial library: Serial.begin(speed), Serial.print(data), Serial.println(data), Serial.print(data,BYTE), Serial.available(), Serial.read()
- Serial monitors: Zterm for Mac, BrayTerminal for Windows, GTKTerm for Linux
- analog input: analog digital conversion (ADC), more info
- MCU's way of reading analog signals: reading voltage
Session 3
link: slideshow used in the third lab
- Serial library: Serial.available(), Serial.read()
- analog output: fading control with Potentiometer
- Software commands: analogWrite(pin, value), delayMicroseconds(time)
- Components: potentiometer, piezo
- analog output: Pulse Width Modulation (PWM)
- Sound production: period = 1/frequency, generating tones
- examples: Fading LED, Physical Pixel (control it from Serial Monitor), Play Melody, Keyboard Serial, Knock sensor
Session 4
- complex sensors: measuring the environment requires the use of intelligent sensors that include their own microprocessors to handle data. Examples of this are accelerometers, ultrasound, infrarred, etc.
- it is good to consider what we are measuring from an abstract point of view and then see which tools will make it possible afterwards. E.g. if we want to measure presence, we should consider different types of sensors to do that: LDRs for close distances (<10cms), IR for intermediate distances (10-80cms), US for long distances (30cm-10m)
- using the ultrasound sensor PING from Parallax: the trick is to use one pin both as input and output during the loop. The way to do this goes through changing a pin's configuration interactively in the process using pinmode(pin,INPUT/OUTPUT). The sensor acts very much like a sonar, sending one US signal when requested, and listening to the echo coming back. The result is expressed by the sensor as a pulse which width denotes the distance to the object in front of it. The US sensor is very accurate, but has to be placed at the object's nose
- Example with the PING sensor
- components: US sensor, accelerometer
- Components: transistor, motors
- Software commands: creating functions, using parameters
- using transistors to control artifacts that demand higher currents that the one Arduino provides
- types of motors: DC, stepper, servo
- DC motors: run freely, hard to control their position/speed, can use as less as 2,5Volts, speed can be controlled using PWM, we use relays, transistors or H-bridges to control them from Arduino
- Stepper motors: unipolar or bipolar, rotate a certain amount of degrees at each pulse. Typical values of angles are 1,8 - 3,6 - 7,2 ... we use transistors or transistor chips to control them. They have 4 or more wires!
- Servo motors: they will rotate to a certain angle depending on a PWM value we push into them. Servo motors are used in car models to control the direction, model-planes for hte flaps, etc.
- moving DC motors using a transistor: use a power transistor (IRFZ24N) and a 10K resistor to control a DC motor's speed
Session 5
- using puredata
- using Arduino with Flash (optional)
- software: writing functions
PD intro
- created by M. Puckette, distribution maintained by H.C. Steiner
- native (C) software package, multiplatform
- allows the creation of code through visual commands
- used for handling flows of data, mainly in sound production, but also video, 3D, etc
- there is an object called comport that allows reading data from a serial device, it has two parameters: port number, and communication speed
- thanks to that object we can both send and receive data into/from Arduino
- there is an Arduino program called Firmata by H.C. Steiner that allows to read/write all the pins from/to Arduino from yet another PD object called arduino
- if you plan to use it, get a quick intro in how to use puredata: objects, messages, numbers, events, sliders
Processing intro
- created by C. Reas and B. Fry with support among others from the MIT Medialab
- Java software package, multiplatform
- simplifies the creation of code-made animations
- used for interactive installations, motion capture, web production, video postproduction, etc
- there is a library called Serial that includes a whole series of commands to read/write data from/to the serial port
- print(Serial.list()) will print a list of all the available ports in the system, together with a number that will identify them
- the port is created as a software object: myPort = new Serial(this, Serial.list()[number], 9600)



