FYI: Working on a implementation for the real time clock

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

FYI: Working on a implementation for the real time clock

Postby burti » Sun Sep 13, 2009 4:21 am

As far as I noticed there is no implementation for the real time clock of mindsensors for Lejos. I'm working on that. Reading the time and date from the RTC works fine yet.
Writing the time and date to the RTC and changing the time periode from 24h to am/pm and vice/versa isn't supported by my implementation yet though. (I haven't programmed it ;-)

Moreover I want to introduce a date-time class names RTCDateTime class which can only represent the possible values of the RTC.
My implementation shall only work with that to ensure facing valid date and time values. (Writing invalid into the RTC may result in unknown behaviour !).
There will be routines to transform it into a Date instance and vice versa of course.
I will tell you as as soon as it is ready to be used.
burti
Novice
 
Posts: 61
Joined: Thu Jun 25, 2009 11:41 pm

Postby lawrie » Sun Sep 13, 2009 5:46 pm

If you post your implementation here or send it to me at lawrie.griffiths@ntlworld.com, I will add it to leJOS.
lawrie
leJOS Team Member
 
Posts: 843
Joined: Mon Feb 05, 2007 1:27 pm

Is the mindsensors real-time clock driver working

Postby rsdavis » Tue Mar 01, 2011 2:32 am

Does lejos contain the software to read/write the mindsensors real-time clock? I saw post here for a working implementation but do not see it in lejos.
rsdavis
New User
 
Posts: 9
Joined: Mon Jan 17, 2011 4:18 pm

Re: Is the mindsensors real-time clock driver working

Postby bbagnall » Sat Mar 05, 2011 9:54 pm

rsdavis wrote:Does lejos contain the software to read/write the mindsensors real-time clock? I saw post here for a working implementation but do not see it in lejos.

It doesn't look like we have this class in subversion. I have one of these sensors so maybe I'll give it a try. We also have a Date class that was programmed by Juan Antonio, so that should come in handy for parsing time data from this.

It would be neat if every time you uploaded code from your PC it would update the system clock. GPS devices would also be capable of updating the clock (I think this was Juan's initial reason for adding Date to the API). I'll let you know when I have something with the sensor.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Re: FYI: Working on a implementation for the real time clock

Postby bbagnall » Sat Mar 05, 2011 10:01 pm

I just noticed we have lejos.nxt.addon.NCTrtc. That makes things easy! I've renamed it RealTimeClock in subversion so that it will be easier to discover.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff