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.
Touch can be wrapped in a robotic device, ex: Paro (wiki) trade show demo.
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”:
https://en.wikipedia.org/wiki/Eye_movement_desensitization_and_reprocessing
SparkFun biometric sensors: https://www.sparkfun.com/categories/146
UPMC lobby temperature check: upmc-lobby-temperature-check
Serial Communication
SPI/I2C and complex communications protocols
How we get complex data from sensors – a lot of this is hidden in libraries
Unique IDs
Simple controls for complex output: neopixel
SparkFun’s version: Qwiic
Interrupts
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
Question: What if you were playing mp3 files or video, how would you use interrupts as part of the interface?
For hardware, other devices can generate interrupts like when putting on AirPods, it automatically syncs with the music app and the banner pops up on the interface indicating that it has been connected. In this case, the music app was being used, and it is interrupted by the bluetooth settings UI. Or as in YouTube, the messages like “press ESC to exit fullscreen” or “press spacebar to pause and start” pop up on the interface as well. Every keystroke itself generates as interrupts in this UI. I would use interrupts as part of the interface by different components such as banners, notifications, or a floating button, and add animations when appearing and exiting to make it look as smooth as possible for the user and not to make them feel annoyed by sudden interface changes.