Sample code using onebutton lib to demo how to use one button for input The project using OLED 128x32 I2C for display Project show Random number 1-6 like a dice, 2 dices, 3 dices by setting mode
Playing with arduino, how to handle switch short press and long press long press to switch between working and setting mode.
See Video here https://www.youtube.com/watch?v=XoLlGbgHw9M
Project using
- Arduino board (in vdo using arduino pro mini)
- OLED I2C 128x32 (SSD1306)
- Push Switch