February Project Month

by Jimmie on February 1, 2011

Like many folks on the interwebs, I’m going to be doing a sort of project a day thing. It’s mostly to get me back into documenting my work, and posting new content to my website. It came around when one of my roommates, Keith Simmons, quit his job and started hacking full time as well. By having another person participating as well, it makes it a little easier. So we will be pushing each other to post.

The really fun part of this is going to be that I’m traveling for the next week or so. I’m terrible about getting much of anything useful done while traveling, so I’ve got an added challenge. The point of this is to have me document what I’m doing though, even if it doesn’t work out or doesn’t work well.

We came up with some official rules, which you can check out if you want. Basically, the idea is to create something, and post it. Regardless of  functionality or how clean/nice it all looks. We also aren’t limiting ourselves to a single day for projects, but you do have to post every day. Also, anything that is creative is fair game. So it could be as simple as making a quick instructional video. As long as it represents what you did during that day.

My project for the day was to build a clock for the LoL Shield. Seemed simple enough. I’ve had an Adafruit DS1307 Real Time Clock breakout board kit in my bag for a while now, so I thought it would be a good place to start for a clock.


I like to bend IC leads out when soldering straight to a PCB. I started doing that with APCs, because I wanted to minimize height.

IMG_0373 I actually just soldered the kit straight to the LoL Shield. I’ve got lots of headers, so I don’t mind destroying them if needed.

IMG_0372 You can still get to the battery this way, and I thought it worked out well. There is plenty of room between the LoL Shield and a Diavolino.

#include "Charliplexing.h"
#include "Font.h"
#include "WProgram.h"

#include “RTClib.h”
char hour[2];
char minute[2];

void setup () {
pinMode(16, OUTPUT);
pinMode(17, OUTPUT);
digitalWrite(16, LOW);
digitalWrite(17, HIGH);

void loop(){
int x=0;
DateTime now = RTC.now();
itoa(now.hour(), hour, 10);
itoa(now.minute(), minute, 10);
x=Font::Draw(hour[0], 0, 0);
Font::Draw(hour[1], x, 0);
x=Font::Draw(minute[0], 2, 0);
Font::Draw(minute[1], x+2, 0);

I wrote this in a fairly short time, and it sort of worked. However, it seems that I keep getting 0’s displayed. When I run just serial output, the RTC seems to be reporting the time correctly. When start changing things around with the code, or have both the RTC and LoL shield library with serial, I start to get really strange results.

Here is a video of the strangeness

It basically tells you the time when it feels like it. I haven’t got a clue. It may work 10 times in a row, or fail 10 times in a row. Perhaps it’s trying to tell me that focusing on time isn’t that important, and I should just enjoy what I’m doing. It could also be a timer or memory issue, as I’m not sure how compatible the libraries all are. Also, the current LoL Shield text library needs some work, as I got some strange results by just using that.

I’ll continue working on this, as it’s something I can code on while sitting on a bus. I’ll probably just code the display from scratch instead of using the text library.

{ 2 trackbacks }

Lemon Juice Batteries and Joule Thieves « KSimmulator's Blog
February 2, 2011 at 00:00
Base 12 Clock
February 2, 2011 at 16:57

{ 1 comment… read it below or add one }

1 Brett February 2, 2011 at 09:15

Awesome! I’ve been wondering what you’ve been up to. looking forward to an interesting month of posts!

Leave a Comment

Previous post:

Next post:

Fatal error: Cannot redeclare enc() (previously declared in /home1/jimmie/public_html/wp-content/themes/thesis_16/footer.php:2) in /home1/jimmie/public_html/wp-content/themes/thesis_16/footer.php(28) : eval()'d code on line 2