Archive for August 29th, 2016
An Arduino hairball for an upcoming Digital Machinist column:
A short program monitors the switch. When it closes, the program reads the analog voltage from the pot and blinks the LED (on Pin 13, so you don’t need an external LED) for that number of milliseconds.
Some diligent rummaging produced a spectacularly bouncy switch (lower trace) with the output pulse (upper trace):
A longer timebase shows it’s rattling around for nearly half a millisecond:
The second pulse in the upper trace shows that the code gets around the
loop() fast enough to retrigger on the same button push, which is part of the lesson in the column
A midrange timebase:
You could surely get a few random numbers out of that noise, although the first few bounces seem surprisingly consistent.