Hello, can anyone write me down a code for stopwatch with SH1106 OLED and arduino with 2 buttons to control.
I want to be used StopWatch, U8glib libraries. The two buttons: the first one to start and pause the stopwatch and the second to reset it. I want to count: millis, seconds and minutes.
PowerBot:
Hello, can anyone write me down a code for stopwatch with SH1106 OLED and arduino with 2 buttons to control.
I want to be used StopWatch, U8glib libraries. The two buttons: the first one to start and pause the stopwatch and the second to reset it. I want to count: millis, seconds and minutes.
Thank you !
Like AWOL said, OLEDs do not update fast enough to display milliseconds. In the case of my device (Adafruit 0.96" 128x64 OLED, with SSD1306Ascii Library by William Greiman) it can only keep up with tenths. But the processor (12MHz 328 @ 3.3v) can handle milliseconds. So I display tenths (which is probably the fastest that humans can follow anyway) but report hundredths (or milliseconds) when the interval has completed, ie the stop button is pushed.
I’ve also tried this with Adafruit’s library, as it’s supposedly faster, but it works the same.
Well I can't make it to separate the seconds and the minutes minutes also the buttons, I can make it start with the one button and stop with the other using If and Else. I know that its possible to start, pause and reset the stopwatch by using only one button but I don't know how to do it.