rodan / ds3231 Goto Github PK
View Code? Open in Web Editor NEWarduino library for DS3231 RTC
Home Page: http://www.maxim-ic.com/datasheet/index.mvp/id/4627
arduino library for DS3231 RTC
Home Page: http://www.maxim-ic.com/datasheet/index.mvp/id/4627
The code that is provided will not allow me to upload it to my board and it keeps telling me that there is an error compiling at first I thought it was my software but then I did a different code and it worked help me please
Hi,
Is there a way to check that the DS3231 is answering ?
I would like to make an if statement that stops the sketch if the a DS3231 boar dis not answering.
Thanks,
Hi im trying to figure out how to print dayOfWeek on LCD
`//DHT11 Sensor:
#include "DHT.h"
#include <DS3231.h>
#define DHTPIN 5 // what digital pin we're connected to
#define DHTTYPE DHT11 // DHT 11
DHT dht(DHTPIN, DHTTYPE);
DS3231 clock;
RTCDateTime dt;
//I2C LCD:
#include <Wire.h> // Comes with Arduino IDE
#include <LiquidCrystal_I2C.h>
// Set the LCD I2C address
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
void setup() {
Serial.begin(9600);
lcd.begin(20,4);
Serial.println("DHT RTC with LCD Test");
Serial.println("Initialize DS3231");
clock.begin();
dht.begin();
}
void loop() {
// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
int h = dht.readHumidity();
int t = dht.readTemperature();
dt = clock.getDateTime();
// set the cursor to (0,0):
lcd.setCursor(0, 0);
// print from 0 to 9:
lcd.print("Temp: ");
lcd.print(t);
lcd.print("C");
// set the cursor to (16,1):
lcd.setCursor(0,1);
lcd.print("Humidity: ");
lcd.print(h);
lcd.print("%");
lcd.setCursor(0,3);
//lcd.print("DateTime:");
lcd.print(clock.dateFormat("d-m-Y H:i:s", dt));
/*Serial.print("Long number format: ");
Serial.println(clock.dateFormat("d-m-Y H:i:s", dt));
Serial.print("Temp: ");
Serial.print(t);
Serial.print("C, Humidity: ");
Serial.print(h);
Serial.println("%");
delay(1000);
*/
}
`
appreciate your support
The statement " t.wday = inp2toi(cmd, 7);" appears to be in error. It does not cause an issue for execution of the example or the compiler. However, the weekday field is only one byte not two. Therefore, the value stored in t.wday is invalid.
having issues understanding day of week number, is Sunday=1 or 0, or 7?
i.e. is it Mon-Sun (1-7)?
When I set the date time, the wday seems to be ignored (from what i send in), yet when I change the date to something else in the week, it doesn't appear to update correctly.
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.