Long press and double click
Three gestures from one button: a state machine that waits a moment to tell a click from a double click, and reports a long press while the button is still held.
Open it in the simulatorRead people properly: button bounce on a scope and debouncing, clicks, double clicks and long presses, rotary encoders, matrix keypads, MPR121 touch and joysticks, then a retro game menu with a high score entry screen.
0 of 7 done
7 lessons in 4 chapters, about 6 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.
Three gestures from one button: a state machine that waits a moment to tell a click from a double click, and reports a long press while the button is still held.
Open it in the simulatorSixteen keys on eight pins: scanning rows and columns, pressed, held and released events from the Keypad library, two keys at once, and a door code typed into a buffer.
Open it in the simulatorTwo potentiometers and a button that should feel right: centering at start-up, a dead zone, -100 to 100 per axis, direction events that repeat while held, and a fire button.
Open it in the simulatorEach lesson opens when the one before it is done, and each chapter ends in a project.
Bounce, debounce, and gestures from one button.
One press, many edges: a scope on a bouncing pushbutton, an interrupt that counts every edge, and a debounce that waits for the contacts to settle before believing them.
0 of 6 steps
Three gestures from one button: a state machine that waits a moment to tell a click from a double click, and reports a long press while the button is still held.
0 of 6 steps
Rotary encoders and matrix keypads.
A knob that never ends: two contacts a quarter cycle apart, a state table that turns them into steps and a direction, interrupts so no step is missed, and bounce that the table shrugs off.
0 of 6 steps
Sixteen keys on eight pins: scanning rows and columns, pressed, held and released events from the Keypad library, two keys at once, and a door code typed into a buffer.
0 of 6 steps
Capacitive pads and analog joysticks.
Twelve touch pads on one I2C chip: capacitance that drops when a finger comes near, a baseline that tracks it, thresholds that decide a touch, and a note for each pad.
0 of 6 steps
Two potentiometers and a button that should feel right: centering at start-up, a dead zone, -100 to 100 per axis, direction events that repeat while held, and a fire button.
0 of 6 steps
A retro game menu with a high score entry screen.
A Star Blaster arcade menu on a 16x2 LCD and a rotary encoder: scroll and press, a sound toggle, a high score table in EEPROM, and initials dialed in letter by letter.
0 of 7 steps
All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.
Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.
Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kitYes. All 7 lessons of Buttons, encoders, keypads and touch are free and run in your browser, with nothing to install and no parts to buy before you start.
No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.
About 6 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.
Each chapter ends in a project that puts it together: Long press and double click, Matrix keypads and Joysticks.
With "Bounce on the scope, and debounce", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.