You are reading a single comment by @CanyonCasa and its replies.
Click here to read the full conversation.
-
@Ron, nice work. I would suggest "near" and "far" events as "close" can be confused with the verb close as in shut or end, often associated with streams.
@tc You just beat me to posting this :) I had a similar idea I've been building in the recent days, especially rotation for volume control.
Mine's here: https://github.com/rsmeral/puck.js/
I modularized it into these
Button - emits events for single/double/long/multi press
Proximity - emits "far" and "close" events, emulating a proximity sensor (based on light)
Scroll Wheel - emits "plus", "minus" and "notch", based on magnetometer
Lights - (WIP - works, but needs tweaks) - pretty API to control the LEDs
The VolumePlayPause demo is quite fat (especially due to Lights being fat) - when I load it through the Web IDE, it gives me Out of memory error, but when loaded through CLI, it works OK. Most likely the difference is in minification.