Housekeeping
- Results from your technology analysis assignments
- Questions from Arduino assignments – anything you’d like to show us, talk about? You should have…
- Tried examples on the Arduino site of…
- Read:
- Paul Verilio @ Vice Magazine
- “The invention of the ship was also the invention of the shipwreck.”
- Robustness / delicateness of systems: “So you go from the plane that can go really fast to the plane that can’t fly at all.”
- “I believe that you must appreciate technology just like art.”
- On valuing perhaps subtly different forms of innovation – 4chan founder
- Speed and evolutions – swift animals usually have large eyes
- McLuhan Understanding Media (Chapter 4 – The Gadget Lover)
- Paul Verilio @ Vice Magazine
Rationale
Today we’ll look at what is happening underneath the hood of the Arduino a little – how it represents and processes “the world.”
As well, we’ll look at some further elements you should know about for control of and measurement in your projects.
From Last Week
- What is happening when we ask the Arduino to ‘blink’?
- Analog = Analogous
- Hold hands!
- The squeezing of a hand… –> Drawing on the board
- What are the characteristics of this (instantaneous/atemporal, subjective)?
- More than one link in the chain…
- Transferring a signal between more than one person
- What about long distances (or even short distances accurately)?
- What would be a better way to do this?What are the characteristics of this (synchronous, memory based, objective)?
- Analog <–> Digital – why digital?
- ADC - Analog to Digital Conversion
- There is, of course – OUTPUT as well… DAC, Digital to Analog Conversion
Little Bit of Signal Theory
- ‘Signals’ are characterized by their
- period - the interval of time between successive occurrences of the same state in an oscillatory or cyclic phenomenon, in seconds.
- frequency - the rate at which something occurs or is repeated over a particular period of time, in cycles/second = hertz
- amplitude - the maximum extent of an oscillation, measured from the position of equilibrium
Representation
- Sampling
- Resolution, Sample rate
- Nyquist’s theorum describes this processes’ potentials and limitations
- How many (more) samples do we need to take for a signal that is twice as “fast”…?
- Resolution & Sampling
- Image quality examples (spatial aliasing)
- Imaging Sensor (e.g.: photography)
- Moving image examples (temporal aliasing)
- Wagon Wheel Effect
- Wagon Wheel Effect demo
- Aliasing
- Nate the mathematics guy explains aliasing
- Digital Numbers
- Decimal (base-10) numbers
- Binary (base-2) numbers
- ASCII Characters - the ASCII Table
- Arduino
- The ADC on the Arduino… why does the ADC give us 0-1024?
- What is the “sample rate” of Arduino’s ADC? (microphone)
- Different kinds of variables = different kinds of resolution (bytes vs integers)
- System.println options – DEC, BYTE, BIN
- successive approximation ADC
- bitRead(x, n) – returns the “binary” value of a certain ‘bit’ in a number
This Substance of Electricity
- Waterfalls, bolders – metaphors for electricity…
- LED “circuit“
- The “voltage divider” = potentiometer – what’s really going on in there?
- Electricity:
- Voltage
- Resistance
- Current – led ‘circuit’
- Ohm’s Law: V= iR
- Electromagnetism – relays, solenoids, electromagnets
- Semiconductors – transistors, microchips
- Inputs – sensors! A lot to cover here…
- physical properties of the thing being sensed
- thermal
- electromagnetic (e.g.: the hall effect)
- mechanical
- chemical
- optical and radiation (e.g.: geiger counter)
- properties of the sensor
- Continuous/Discrete/Sampling rate
- Dynamic Range (high/low)
- Resolution (high/low)
- Repeatability & Long-term sensor drift
- ‘interaction potential’?
- fine/coarse control
- mental model
- expressiveness / satisfaction
- physical properties of the thing being sensed
Back to Microcontrollers
- Synchronicity – the clock
- Programming –> Compiling –> Loading
- The programming “stack”
- Facilities of the ‘chip’ Serial data transfer
- Serial data transfer – UART
- Analog to Digital conversion – analogRead()
- Digital to Analog conversion – PWM – analogWrite()
- a built in timer – millis();
Programming structures
- Most things are common to all programming languages!
- Flow… “Threading” and timings in a microcontroller
- why PWM, UART (serial ports) are important
- interrupts (a microchip’s subconscious mind??)
- Variables
- Choices – “if” statements – e.g.: thresholding
- More than one choice – “case” statements – e.g.: metering
- Over and over – “for” loops – e.g.: S.O.S.
- Creating a function – concealing/repurposing a set of functions – e.g.: the S.O.S. function
- Timing – how long since something happened – e.g.: millis
- “Counting”
- The increment operator (++)
- Modulus
- What if you want something to happen every X number of times?
- count up, whenever the ‘modulus’ of that count is “0″ – you can trigger an action. Very useful.
To Do
- Go for a walk and and take photo of three electronic sensors you encounter out in the world. Upload these to your blog, and describe what they were measuring, and what they were using this to control
- Look at these Arduino_SecondExamples.zip
- Do two of these three things:
- 1) Create a counting machine that uses a sensor input
- count a physical movement action from the ‘real world’
- include a physical/visual output which occurs after a certain, meaningful number of ‘counts’
- Can you think of (and perhaps sketch?) a small project based on the “Tower of Hanoi” puzzle or the “Two Generals” problem?
- Post these and any other ideas (responses to the readings) to your blog
- 1) Create a counting machine that uses a sensor input
- Readings from Jamie:
