Popis
DS3231
Vysoko presný modul hodín RTC pre Raspberry Pi (ER-RPA32311R)
Vlastnosti |
|
---|---|
Zoznam balíka | DS3231 High Precision RTC Clock Module x 1 |
DS3231 High Precision RTC Clock Module For Raspberry Pi (ER-RPA32311R)
DS3231 High Precision RTC Clock Module for Raspberry Pi (ER-RPA32311R)
Features
- to 40℃ to + 85℃ temperature range, timing accuracy in a plus or minus 5 PPM (+/- 0.432 SEC/day)
- To provide continuous timing battery backup
- Low power consumption
- The device compatible with DS3231 encapsulation and function
- Complete the clock calendar function including the second, minute, time, week, date, month, and year, and provide the valid until 2100 leap year
- Two calendar clock
- 1 Hz and 32.768 kHz output
- Reset the output and input button to tremble
- High speed (400 KHZ) the I2C serial bus
- + 2.3 V to + 5.5 V power supply voltage
- The accuracy of plus or minus 3℃ digital temperature sensor
- – 40 ℃ to + 85℃ temperature range
Operating Voltage | 2.3 to 5.5V (3.3 or 5V typical) |
Current Consumption | < 300µA (typ.) |
Accuracy (0-40°C) | ± 2ppm |
Battery | CR2032 (3V Coin) |
Raspberry Pi DS3231 zahraničný vysoko presný hodinový modul
Dávajte pozor na modul Arduino základná doska môže byť tiež použitá.
Samotný modul je možné prispôsobiť na 3,3 V a 5 V systém,
žiadna konverzia úrovní, je to super pohodlné!
Vlastnosti:
až 40° až + 85° teplotný rozsah, presnosť časovania v
plus alebo mínus 5 PPM (+/- 0,432 SEC/deň)
Na zabezpečenie nepretržitého zálohovania batérie
Nízka spotreba energie
Zariadenie kompatibilné so zapuzdrením a funkciou DS3231
Dokončite funkciu kalendára hodín vrátane sekundy, minúty,
čas, týždeň, dátum, mesiac a rok a uveďte platné do 2100 priestupného roku
Dve kalendárové hodiny
1 Hz a 32,768 kHz výstup
Resetujte výstupné a vstupné tlačidlo na trasenie
Vysoká rýchlosť (400 kHz) sériovej zbernice I2C
+ 2,3 V až + 5,5 V napájacie napätie
Presnosť plus alebo mínus 3° digitálneho snímača teploty
Rozsah teplôt 12.- 40 ° až + 85 °
Here’s
#include "Arduino.h"
#include "Wire.h"
#include "uEEPROMLib.h"
// uEEPROMLib eeprom;
uEEPROMLib eeprom(0x57);
void setup() {
Serial.begin(9600);
delay(2500);
Wire.begin();
int inttmp = 32123;
float floattmp = 3.1416;
char chartmp = 'A';
char c_string[] = "lastminuteengineers.com"; //23
int string_length = strlen(c_string);
Serial.println("Writing into memory...");
// Write single char at address
if (!eeprom.eeprom_write(8, chartmp)) {
Serial.println("Failed to store char.");
} else {
Serial.println("char was stored correctly.");
}
// Write a long string of chars FROM position 33 which isn't aligned to the 32 byte pages of the EEPROM
if (!eeprom.eeprom_write(33, (byte *) c_string, strlen(c_string))) {
Serial.println("Failed to store string.");
} else {
Serial.println("string was stored correctly.");
}
// Write an int
if (!eeprom.eeprom_write(0, inttmp)) {
Serial.println("Failed to store int.");
} else {
Serial.println("int was stored correctly.");
}
// write a float
if (!eeprom.eeprom_write(4, floattmp)) {
Serial.println("Failed to store float.");
} else {
Serial.println("float was stored correctly.");
}
Serial.println("");
Serial.println("Reading memory...");
Serial.print("int: ");
eeprom.eeprom_read(0, &inttmp);
Serial.println(inttmp);
Serial.print("float: ");
eeprom.eeprom_read(4, &floattmp);
Serial.println((float) floattmp);
Serial.print("char: ");
eeprom.eeprom_read(8, &chartmp);
Serial.println(chartmp);
Serial.print("string: ");
eeprom.eeprom_read(33, (byte *) c_string, string_length);
Serial.println(c_string);
Serial.println();
}
void loop() {
}
Here’s
#include "Arduino.h"
#include "uRTCLib.h"
// uRTCLib rtc;
uRTCLib rtc(0x68);
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
void setup() {
Serial.begin(9600);
delay(3000); // wait for console opening
URTCLIB_WIRE.begin();
// Comment out below line once you set the date & time.
// Following line sets the RTC with an explicit date & time
// for example to set January 13 2022 at 12:56 you would call:
rtc.set(0, 56, 12, 5, 13, 1, 22);
// rtc.set(second, minute, hour, dayOfWeek, dayOfMonth, month, year)
// set day of week (1=Sunday, 7=Saturday)
}
void loop() {
rtc.refresh();
Serial.print("Current Date & Time: ");
Serial.print(rtc.year());
Serial.print('/');
Serial.print(rtc.month());
Serial.print('/');
Serial.print(rtc.day());
Serial.print(" (");
Serial.print(daysOfTheWeek[rtc.dayOfWeek()-1]);
Serial.print(") ");
Serial.print(rtc.hour());
Serial.print(':');
Serial.print(rtc.minute());
Serial.print(':');
Serial.println(rtc.second());
Serial.print("Temperature: ");
Serial.print(rtc.temp() / 100);
Serial.print("\xC2\xB0"); //shows degrees character
Serial.println("C");
Serial.println();
delay(1000);
}