chebe: (WalkSign)
[personal profile] chebe
The first GaelHack took place a couple of weeks ago, the weekend of Friday 7th to Sunday 9th of June. It was a nice way to start a new tradition, with about twenty people from all over Ireland attending. (I think all but two of the hackerspaces were represented.) It was held on a scorcher of a weekend, in a boarding-school-converted-into-Scouts-Centre, with the option of camping or boarding in the hostel like rooms.

We took over a large room with a bunch of tables and chairs, set up the projector, and got started. There were a few presentations, a couple of hands-on workshops, and a few excursions out-of-doors into the beautiful sunshine to play with aerials and satellites. And to get the occasional ice-cream. In some ways the location was ideal (sunshine, quiet, facilities), but it did lack in some respects (insufficient internet, barely any phone signal, children everywhere). It was definitely a good start though, and at the end there was a great discussion, with people from different hackerspaces volunteering to look around their own localities for alternatives. I'm looking forward to next years. (There's a very thorough write-up by another attendee on the way, I'll link to it here when it's live. *EDIT* link)

Throughout the activities, in spare cycles, we worked on our own projects. It struck me how awkward Ardunio can be when you don't have an awful lot of internet to go looking for, and downloading, documents, tutorials, and libraries. But I persevered, emboldened by fellow attendees reminding me that there is almost always a library out there already. I got started learning to use I2C, real-time-clocks, and seven-segment-displays. Obviously I built a clock. This is the first step towards something else, but let's not get ahead of ourselves.

Arduino Uno, (you can ignore the MicroSD-shield, it's not doing anything here,) Sparkfun Real Time Clock Module, Adafruit 4-digit 7-segment display. The display requires you to install two libraries details here, and even though I'm using the Sparkfun RTC it uses the same chip as the Adafruit one, and Adafruit provide a library here.

The only gotcha that I ran into is that the RTC time is not set, and it is not running when you get it. (It also needs to be hooked up to 5V, otherwise when you query it you get a nonsense response.) To set the time to the time on your computer there's a section in the Adafruit example setup().
  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.adjust(DateTime(__DATE__, __TIME__));

By default it doesn't execute. I had to remove the not to get it to run, i.e.
  if (RTC.isrunning()) {

You only need dto do this whenever you want to change the time, so ideally just the once. After that I just played around with the display, and got the colon blinking like commercial digital clocks.

Arduino Uno connected to Real Time Clock module and four-digit seven-segment display module via breadboard, displaying time of 11:46

Arduino digital clock
Photo by chebe

Note; videos seems to be not working right now, putting here for when they are, but in meantime; direct link.

Video of Arduino digital clock ticking
Video by chebe

Great project. Can you provide code?

Date: 2013-08-31 11:10 pm (UTC)
From: [personal profile] jpreller
Hi there,

I am a beginner and trying to build a project like yours (read the time from a TinyRTC v1.1 RTC and prints it to a 16 x 2 LCD. I can print the time to the LCD, but, for the life of me, I can't set the RTC to the correct time to start with. I have also ordered the Adafruit LED 7 segment display that you have used, so I am hoping that I can learn a lot from your code.

Thanks so much
Page generated 2017-Mar-24, Friday 12:01 pm
Powered by Dreamwidth Studios