Assignment 6: Interrupts and motion

Due Mon night, 11:59 pm

Like assignment 5, give data visual representation, but look at accessibility for someone without hearing or vision.   Use interrupts to generate / modify the information being displayed, to control the information from another source.  Experiment with more than one interrupt happening at the same time.

The example we discussed in class is how would you let a person without hearing know that someone was knocking at the door or ringing the doorbell?

Class Notes: 10 October, 2019

Input classification, serial communication, interrupts

Types of Input

monophonic + skill: wind instruments, percussion

polyphonic + tech: keyboards, pianos, organs, strings
anthropomorphic: respond to human condition, heart rate, blood pressure, galvanic skin, breath rate, pulse rate, visual interpretation of secondary movements: eye twitch, touching your face, blinking

Golan Levin “Opto-Isolator

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
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 example interrupts

Class Notes: 8 October, 2019

Crits will move to Tuesdays

Haptic/touch vs.  objects moving in space

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.

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 steppers

On the legality of counting cards and getting free food and drink at a casino

Gambling and magic tricks have a role in interaction design but I have trouble working them in to the syllabus without encouraging illegal behavior on campus.

The MIT Blackjack Team has a good FAQ on counting cards.  tl;dr: Yes, it’s legal to count cards but not with the aid of any external device or help.  In Las Vegas the casinos are privately owned and they are allowed to eject anyone they suspect of counting cards.

The scheme my friend used to get us free food and drinks in Tahoe casinos was to be seen as people gambling (and losing) a lot of money; we’d get vouchers for free food and drink at the house restaurant.  The (legal!) scheme was betting “Don’t Pass” at the craps table more often than not.  That is, we were betting that the person shooting dice will lose and the house will win.   This is how casinos make money — the people gambling lose more often than the house, so the house wins more money and makes a profit.  When the house notices you’re winning more often than losing (and cutting in to their profit) they change the payoff for winning a “don’t pass” bet or simply close the table.  However, we still had our vouchers for free meals and drinks!

If that doesn’t make any sense, the wikipedia page might help.