0 ratings0% found this document useful (0 votes) 348 views12 pagesArduino Real Time Clock 7 SEGment Display
Arduino Real Time Clock 7 SEGment Display
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
si18r20%8 AArdsino rel time clock 7 SEGment display
HOME
ArduinoSensors.nl
Stnsortormaroconohet
Om Ledger Nano S 79€ cD
Subscribe to PUSH notifications to get updates on new posts!
Arduino real time clock 7 SEGment display
November, 2018 Danny vanden Brande 0
hitplog.aréuinosensors.n2016/"1/06/arduino-realtime-clock-7-segmentispay! nesi18r20%8
AArdsino rel time clock 7 SEGment display
Hello world! Today i made a Arduino real time clock on a 4
digit display. The display i used is not really for clocks but it
works, only the 2 dots are not in the right place, but you do
not have to change anything in the code. You need a Library
for this project. Follow the next step for the Schematic, Code
& Parts list.
You need the following library SevSeg.h <-download it here
check if you are using a common anode or cathode display
You can change this in the code at line 26 int displayType =
COMMON_CATHODE; //change that to COMMON_ANODE
Other instructions on how to set time are in the code for the
Arduino real time clock.
hitplog.aréuinosensors.n2016/"1/0S/arduino-realtime-clock-7-segmentispay!si18r20%8 AArdsino rel time clock 7 SEGment display
hitplog.aréuinosensors.n2016/"1/0S/arduino-realtime-clock-7-segmentispay! anasi18r20%8 AArdsino rel time clock 7 SEGment display
Wire everything like the schematic and upload the code!
Make sure the library is installed.
Parts list:
Arduino uno
AT24C32 / DS1307 real time clock (| used the one on the
picture above. There is also room for a temperature sensor
like the LM35 on it)
hitplog.aréuinosensors.n2016/"1/0S/arduino-realtime-clock-7-segmentispay! anasi18r20%8 AArdsino rel time clock 7 SEGment display
AX IK RESISIOS (Opuonay
Jumper wires set MM/FM/MF
Code:
,
‘Author: Danny van den Brande, arduinosensors.nl. BlueCore Tech.
This code is written for the AT24C32/DS13@7 RTC Module and
4 digit Seven Segrent displays
Be sure to check if you have a common anode or cathode display. (change @ lit
7
#include "Wire.h
#include "SevSeg.h" //https://qi thub..com/sparkfun/SevSeg/tree/master/src
#deFine DS1307_ADDRESS 0x68
//Create an instance
SevSeg display7seg;
int valor =
byte zero = 0x00;
unsigned Long timer;
void setupC)
Wire.begin();
//Conment this line after you have set the date @ void TineSelection() be
// TimeSelection(); Uncomment this line when your setting the tine. Set t
7/Change to COMMON_ANODE if you have a Common anode display.
int displayType = COMMON_CATHODE;
int digiti =
int digit2
int digit3
int digité =
int segh
int segB
int seg¢
int segD
int sege
int segF
int segG
int segDP=
int nunberOfDigits
/Minitialize display
display7seg.Begin(displayType, numberOfDigits, digitl, digit2, digit3, dic
//Set brightness
display?seg. SetBrightness(50);
timer = millisQ;
}
void loop¢)
char tempString[10]; //Used for sprintf
Wire.beginTransmission(DS1307_ADDRESS);
Wire.write(zero);
hitplog.aréuinosensors.n2016/"1/06/arduin-realtime-clock-7-segmentcispay!
en2si18r20%8
AArdsino rel time clock 7 SEGment display
}
int minutes = ConvertToDecinal Wire reads);
int hours = ConvertToDecimal(Wire.read() & @b111111);
sprintfCtempString, "K@2dX@2d", hours, minutes);
display?seg.DisplayStringCtempstring, 3);
void TimeSelection() _//Select date and time here below! !(line 69,70,71)
//after setting time also comment time TimeSelection() @ void setup
{
}
byte seconds = 10; //Valores de 0 a 59
byte minutes = 38; //Valores de 0 a 59
byte hours = 3; //Valores de @ a 23
Wire.beginTransmi ssion(DS1307_ADDRESS);
Wire.write(zero); //Stop no CI para que o mesmo possa receber os dados
//ks Vinhas dbaixo escreven no CI os valores de
//data e hora que foram colocados nas variaveis acina
Wire.wri te(ConvertToPCO(seconds));
Wire.writecConvertToPCO(minutes));
Wire.write(ConvertToPCOChours));
Wire.writeczero);
Wire.endTransmission();
byte ConvertToPCD(byte val)
{
}
//onvert Decimal to binary
return ( (val/10*16) + (valX10) );
byte ConvertToDecimal(byte val)
hitplog.aréuinosensors.n2016/"1/0S/arduino-realtime-clock-7-segmentispay!
enasi18r20%8 ‘Acduino realtime clock 7 SEGment display
Random Posts
[1 Arduino Magnetic Reed Switch KY-021
Fy November 2, 2016 1 0
i
fet), Arduino KEYPAD LCD SHIELD RELAY CONTROL
November 2, 2016 7 2
Gategories
hitplog.aréuinosensors.n2016/"1/0S/arduino-realtime-clock-7-segmentispay!
mesi18r20%8 AArdsino rel time clock 7 SEGment display
Arduino & C# (5)
Arduino & Processing (3)
Arduino projects (86)
November 2016
Arduino - SSR-25 DA solid... | @ DIY Electronics
BEIC. 2 weeks 2 days a
DIY Electronics shared their
post.
Hello world check out this
Youtube video! And subscribe to
my channel! Thanxz!
Read full story Share
Arduino - Temp and hum... @ DIY Electronics
mB 1 mont 2
Hello world check out this
Youtube video! And subscribe to
my channel! Thanxz!
Hello world, i made a simple
example project for the DHT11
hitplog.aréuinosensors.n2016/"1/0S/arduino-realtime-clock-7-segmentispay! anasi18r20%8
AArdsino rel time clock 7 SEGment display
Arduino - Magnetic Reed ...
Arduino - Rotary encoder ...
Arduino - Photoelectric/P....
Tink for the instructable.
http://www...
Read full story Share
@ DIY Electronics
usa mont 290
Hello world check out this
Youtube video! And subscribe to
my channel! Thanxz!
Hello world! | made a little
example of the KY-021 Reed
switch. This code will simply turn
on a relay when removing the
magnetic field. this is used in
many ..
Read full story Share
DIY Electronics
Hello world check out this
Youtube video! And subscribe to
my channel! Thanxz!
Hello world! this time i made a
simple rotary encoder example.
Its very basic and only turns on
a red light when turning to the
right and a green light when ...
Read full story Share
@ DIY Electronics
URES 1 mont 7
Hello world check out this
Youtube video! And subscribe to
my channel! Thanxz!
Follow the link to go to the
intructable!
http:/Awww.instructables.com/id/Photo-
Electric-Alarm-Using-the-KY-
hitplog.aréuinosensors.n2016/"1/0S/arduino-realtime-clock-7-segmentispay! enesi18r20%8 AArdsino rel time clock 7 SEGment display
1 Read full story Share
hitplog.aréuinosensors.n2016/"1/0S/arduino-realtime-clock-7-segmentispay! sonesi18r20%8 AArdsino rel time clock 7 SEGment display
hitplog.aréuinosensors.n2016/"1/0S/arduino-realtime-clock-7-segmentispay! manesi18r20%8 AArdsino rel time clock 7 SEGment display
BlueCore Tech © 2017
hitplog.aréuinosensors.n2016/"1/06/arduino-realtime-clock-7-segmentispay! vane