Code Monkey home page Code Monkey logo

Comments (12)

MarkusLange avatar MarkusLange commented on August 18, 2024

Yes I know, there are 2 problems at this piont.

  1. The Due has no Backupbatterie so there will no data's stored if he is powerless.
  2. The Due does reset with the NRSTB pin. This resets the full chip with all backup regions including RTC, RTT and SC. Only if the reset is done with the NRST pin will these regions stay with their old values. And the value what you get then is the startvalue of the register, everytime

from arduino-due-rtc-library.

JamesSidell avatar JamesSidell commented on August 18, 2024

OK, I thought it was something I was doing wrong in the sketch! Thanks for putting this library together, and I'll look for changes in the future!

from arduino-due-rtc-library.

kapyaar avatar kapyaar commented on August 18, 2024

If I do
rtc_clock.set_clock(0, 0);

then the year is printing as 2070 instead of 1970. I am using Arduino IDE 1.6.4.

from arduino-due-rtc-library.

MarkusLange avatar MarkusLange commented on August 18, 2024

Did you want to set an unixtime oder date and time from compiler?

Can you post the complete sketch?

from arduino-due-rtc-library.

kapyaar avatar kapyaar commented on August 18, 2024

I want to set unitTime (0). When I start the code, it will check to sync
with time from the internet. If not reachable, I want to to set it as
unitTime 0, which should be the 1970 year, etc.

I doubt that it has something to do with SECONDS_FROM_1970_TO_2000

Bcz if I set the time 946684800, the year shows ok as 2000, but if I set it
as 946684799, the year shows as 2099 instead of 1999.

Avarachan

On Sat, Jun 20, 2015 at 1:08 PM, MarkusLange [email protected]
wrote:

Did you want to set an unixtime oder date and time from compiler?


Reply to this email directly or view it on GitHub
#4 (comment)
.

from arduino-due-rtc-library.

MarkusLange avatar MarkusLange commented on August 18, 2024

Can I get the complete sketch

from arduino-due-rtc-library.

kapyaar avatar kapyaar commented on August 18, 2024

I am playing with one of your example sketches
Due_RTC_Simple_Sample_oneline_time_and_date.ino
https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/examples/Due_RTC_Simple_Sample_oneline_time_and_date/Due_RTC_Simple_Sample_oneline_time_and_date.ino

My tests

void setup() {
Serial.begin(115200);
rtc_clock.init();
//rtc_clock.set_clock(DATE, TIME);
//rtc_clock.set_clock(0,0);
//rtc_clock.set_clock(946684799,0);
rtc_clock.set_clock(946684800,0);
}

Avarachan

On Sat, Jun 20, 2015 at 2:37 PM, MarkusLange [email protected]
wrote:

Can I get the complete sketch


Reply to this email directly or view it on GitHub
#4 (comment)
.

from arduino-due-rtc-library.

MarkusLange avatar MarkusLange commented on August 18, 2024

Ah I understand, yes you are right, I will rewrite it so that so that it works without the define SECONDS_FROM_1970_TO_2000 that it will count the ticks from the 1.01.1970 to the actuall date, so that every date from the start of the unixtime will shown correct.

from arduino-due-rtc-library.

MarkusLange avatar MarkusLange commented on August 18, 2024

New version up should work for you purpose

from arduino-due-rtc-library.

kapyaar avatar kapyaar commented on August 18, 2024

Downloaded the new lib, and tested (same as my previous post). rtc_clock.set_clock(0,0) still prints 2070.

from arduino-due-rtc-library.

MarkusLange avatar MarkusLange commented on August 18, 2024

I will take a closer look at the end of the week, may I need to seperate there something with set_clock you can set ntp and unixtime looks like it doesn't work the way I want

from arduino-due-rtc-library.

colesnicov avatar colesnicov commented on August 18, 2024

Bckup battery

from arduino-due-rtc-library.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.