How can I print today's date on LCD ? I have USB nerdkit. I went through their timer example ( which counts seconds from the bootup ) and few forum threads but could not find any discussion on this topic.

regards,
shailesh

July 26, 2010
by hevans
(NerdKits Staff)

Hi ssnirgudkar,

I am very happy to see you diving straight into your NerdKit. Displaying the current date and time on your LCD requries a little bit of outside help because the the little chip has no way of knowing what time it is when it boots up. It does not have an internal clock, or access to that information from the internet like your comptuer does. What you can do however is read that information in from your computer. The most straight forward way I can see of having a current time on your NerdKit is to write a quick Python script to send the current date and time to your NerdKit. There are a couple of examples in our video tutorials of us sending data from the computer to the chip. We do this using Python in our Multi-Panel LED Array.

While the actual idea is sort of simple there are lots of things involved in doing this. You have to install python with the correct modules, write the pyhton script, decode the date on your NerdKit, and get it to the LCD. Keep in mind that all this is pretty complicated stuff. Take it slow and one step at a time, and let us know if you run into any problems!

I hope you are enjoying your NerdKit.

Humberto

July 26, 2010
by ioScream

If I were to do it (which I am).. I would do all the decoding on the Python side, so that you don't take away from the overhead on the MCU. It appears that the space available on the chip can fill up quickly. Plus Python can handle a lot with little effort, though doing this on the chip would be great practice with C and MCU programming.

July 27, 2010
by hevans
(NerdKits Staff)

Hi ioScream,

In this case, with something like date/time it makes more sense to have python do the formatting of the date. With python you can very easily output the date in any format and just send it down to the MCU as a string. It might be a tad bit longer to transfer, but the ease of formatting is worth it.

Humberto

July 27, 2010
by Ralphxyz

Foregoing the PC one could also use a clock chip to send the date to the MCU.