I use a simple schematic for this clock:
Using TM1637_DS3231_clock0.ino sketch, my clock work as a .. clock :))) like in movie named Arduino clock with DS3231 on TM1637 display
so, I change to simple 9
just changing few lines in sketch (TM1637_DS3231_cloc0a.ino).
In Arduino clock with DS3231 on TM1637 display (2) movie, you cand see the diference on display and in sketch....
Next step was to put an encoder (KY-040) to change hours and minutes, schematic is:
(also, I put an speaker/buzzer from PC between D7 and GND).
For change hours, must long push (2-3 seconds) the push button from encoder, and you will see
so, must rotate clocwise to increase value or rotate antioclockwire (trigonometric sense) to decrease value for hour. When hour has desired value must push on button from encoder to enter in mode to change minutes:
Procedure is similar, and after change value for minutes must push on button from encoder to enter in usual mode, as a claock.
TM1637_DS3231_clock1.ino sketch must be used for have a clock like in my description or in Arduino clock with DS3231 on TM1637 display (3) movie:
27.04.2017
This clock can be use also with DS1307 instead DS3231, just need a small change:
so, TM1637_DS3231_clock1a.ino have this chenage and few other for correct few bugs... in Arduino clock with DS3231 on TM1637 display (4)
PS: with last change, you can use DS1307 or DS3231 RTC clock module, without other modifcation.
This clock can be use also with DS1307 instead DS3231, just need a small change:
so, TM1637_DS3231_clock1a.ino have this chenage and few other for correct few bugs... in Arduino clock with DS3231 on TM1637 display (4)
I have ky-040 rotary encoder and 4digit 7 segment.could you pls instruct me to how to make speed (rpm) meter?
ReplyDeleteThanks
see http://nicuflorica.blogspot.ro/2016/10/masurare-turatie-cu-senzor-hall-si.html
Deletewell done
ReplyDeleteDear Sir,
ReplyDeleteI Have Problem : 'class TM1637' has no member named 'set'
can help me?
thanks
Thanks for this - It has been very useful. I used it to build a steampunk clock that chimes the correct number of hrs. If anyone is interested I can share my dodgy code, would love some help in polishing it and creating code to run 2 relays for my second project.
ReplyDeleteCheers
Hello sir,
ReplyDeleteI have two questions :
how to get only one point on the screen instead of 4 ? I would like the point between hours and minutes only in this case 18.20
how to show the year because it doesn't work with :
int year = 2023
tm1637c.point(POINT_OFF);
tm1637c.display(0,year/10); // year
tm1637c.display(1,year%10);
tm1637c.display(2,year/10); //
tm1637c.display(3,year%10); //
delay(500);
many thanks for your help Nicu;
Deleteint y = 2023
tm1637.display(0,y/1000); // 2
tm1637.display(1,(y%1000)/100); // 0
tm1637.display(2,((y%1000)%100)/10); // 2
tm1637.display(3,((y%10000)%100)%10); // 3