Haptic/touch vs. objects moving in space
touching a person vs. moving an object
person presses a button vs. wind blowing a windmill
touching a person vs. moving an object – touch is more personal, requires little energy.
Moving things typically requires an external power source, Arduino can only provide 5V at a few milliamps.
energy required to move large things vs. small things
explain watts vs. amps vs voltage vs. movement
For moving things, use basic physics
- gears — FAQ on 3d printing gears
- levers — drive a lever with a solenoid, transfer short movement to long
- pulleys – drive with DC motors or stepper
Input classification, serial communication, interrupts.
Types of Input
monophonic + skill: wind instruments, percussion
polyphonic + tech: keyboards, pianos, organs, strings
anthropomorphic: respond to human condition, blood pressure, galvanic skin, breath rate, pulse rate, visual interpretation of secondary movements: eye twitch, touching your face, blinking
“rapid eye movement” when eyes are closed, used in PTSD therapy called “EMDR”:
SparkFun biometric sensors: https://www.sparkfun.com/categories/146
UPMC lobby temperature check: upmc-lobby-temperature-check
SPI/I2C and complex communications protocols
How we get complex data from sensors – a lot of this is hidden in libraries
Simple controls for complex output: neopixel
SparkFun’s version: Qwiic
Show examples of interrupt code in the environment
switches on mobiles
remote controls for the projectors, TVs, stereos
little to no latency
complex interrupt systems in video game controllers
rotary encoder (we’ll do a demo later in the semester)
for now, we only use digital inputs for interrupts
Code samples, show how an interrupt can be used to toggle a state by one increment compared to holding down a switch and falling through a number of states.
Note that holding down the switch means the interrupt service routine (ISR) only functions once
Compare to using delay() to sample data every so many units of time.
Use an interrupt to stop a task that takes a long time, say a long for() or while() loop, by adjusting the terminating conditions
Question: What if you were playing mp3 files or video, how would you use interrupts as part of the interface?
zip file with some examples: interrupts-1-pot