1.2.45. fejezet, 7 szegmenses óra és hőmérséklet kijelzés
Beküldte pzoli - 2018, május 19 - 12:30de
Kapcsolódó hivatkozások
- Tiny RTC D1307
- Arduino RTCLib
- MCP23017 IO port expander
- DIY 7 Segment Digital Clock (Youtube)
- 3D Digital Clock (Youtube)
- DIY BIG CLOCK - USB POWERED NIST SERVER TIME KEEPING (Youtube)
Egy egyszerű arduino mintaprogram:
#include <Wire.h> #include "RTClib.h" RTC_DS1307 RTC; void setup () { Serial.begin(9600); Wire.begin(); RTC.begin(); // Check to see if the RTC is keeping time. If it is, load the time from your computer. if (! RTC.isrunning()) { Serial.println("RTC is NOT running!"); // This will reflect the time that your sketch was compiled RTC.adjust(DateTime(__DATE__, __TIME__)); } } void loop () { DateTime now = RTC.now(); Serial.print(now.month(), DEC); Serial.print('/'); Serial.print(now.day(), DEC); Serial.print('/'); Serial.print(now.year(), DEC); Serial.print(' '); Serial.print(now.hour(), DEC); Serial.print(':'); Serial.print(now.minute(), DEC); Serial.print(':'); Serial.print(now.second(), DEC); Serial.println(); delay(1000); }
- A hozzászóláshoz be kell jelentkezni