Time In Netduino 3 - Netduino 3 - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Time In Netduino 3

Time

  • Please log in to reply
5 replies to this topic

#1 bgreer5050

bgreer5050

    Member

  • Members
  • PipPip
  • 28 posts

Posted 28 July 2015 - 11:08 AM

Does the Netduino 3 remember it's time when re-boot ?  I currently have several Netduino 2 Plus units in the field and one problem I continually encounter is time stamp issues.  I have events that I record and send up to a server.  I need my events time stamped but have to rely on connecting to a time server after every boot up.  

 

One thing that I have done in the past is mark the event with an attribute of timeUpdated and if it was not updated then the event would not be sent up to the server until time was updated.  The issue here is that I update the time stamp on my event by doing a TimeSpan on my original time at boot up and the current time once updated and add the difference, but this gets ugly if there is another re-boot before the time is updated.

 

I would also like to hear how others may be handling the same issue.



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 July 2015 - 11:55 PM

Hi bgreer5050,

With NETMF on Netduino, the clock resets when the board is rebooted.

We typically ping an NTP time server as part of startup in applications.

Would a "time" module (with a coin cell battery holder) that remembers time between reboots and when the board is unpowered?

Chris

#3 neslekkim

neslekkim

    Advanced Member

  • Members
  • PipPipPip
  • 350 posts
  • LocationOslo, Norway

Posted 30 July 2015 - 08:15 AM

Isn't this the job for the RTC? (or an external RTC)


--
Asbjørn


#4 bgreer5050

bgreer5050

    Member

  • Members
  • PipPip
  • 28 posts

Posted 30 July 2015 - 12:42 PM

I guess.  I'll look for an external RTC as there is no internal RTC.  Can you recommend an external RTC for the Netduino 2 Plus ?



#5 neslekkim

neslekkim

    Advanced Member

  • Members
  • PipPipPip
  • 350 posts
  • LocationOslo, Norway

Posted 30 July 2015 - 01:04 PM

I can't find the thread now, but I know RTC have been discussed many times, both for Go and 3, since the mcu have built in RTC, but it's not enabled/activacted. I think it was some discussions about how to do it on the 3, but can't find anything.. 

 

Anyway, have a look at this:

http://forums.netdui...ds3231-at24c32/

or google anything with arduino+rtc, since this is similar to other platforms as well.

for instance:

 
just make sure you pick an rtc with batterybackup so the clock doesnt stop when you power off your unit.

--
Asbjørn


#6 Samson

Samson

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationIndianapolis

Posted 10 August 2015 - 09:08 PM

Check out the DC 3.3-5.5V DS3231 High Precision Real-Time Clock Module" on Amazon.  I have used on many Netduino 2+ as well as the 3.  You only need to connect the VCC, GND, SCL & SDA.  Uses the same command set as the DS1307.  Let me know if you need sample code.







Also tagged with one or more of these keywords: Time

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.