Welcome to my random collection of LED projects. Hope you find something interesting, and if you make the clock or improve the code let me know!


Nick, London

54 thoughts on “Hello!

  1. Hi

    Came across your site and the Pong Clock, only problem is that I have the older LED Matrix boards. So………..any plans to release code for working with these boards.


  2. Hey i’m new to Electronic circuiting and I would like to know where to begin. I have a strong want to build and create but I have no idea where to begin. Can you help me??

    • I would look at some of the sites that do kits – e.g. sparkful electronics. Those will give you a good introduction.

      If you like the idea of programming, look at the Arduino kits. There are lots of interesting starter kits that let you do all sorts of cool things. Good luck!


  3. Hey nick,
    I got my sure-16X24 board working. But the problems is that to turn on the single display i need to select both cs1 and cs2 dip switches. I think there is some thing wrong in my code. Can please send me your code. So that I can learn my mistakes. My id is dudedevil100@gmail.com

    Pratik .R. Bhagat

    • Hi Pratik, you can download my code from this pong clock page at the bottom if you want to have a look. Or else there are demos on the arduino site if you search for sure electronics.


  4. hey, i was searching the web and came across this awsome pong clock so i decided to spend the money and do all ur steps but im confused im getting
    pongclock_v2_27.cpp:177:1: error: unterminated #ifndef
    pongclock_v2_27:50: error: redefinition of ‘class Button’
    C:\Program Files\Arduino\arduino-0022\libraries\Button/Button.h:32: error: previous definition of ‘class Button’
    pongclock_v2_27.cpp: In function ‘void gettime()’:
    pongclock_v2_27:142: error: expected `}’ at end of input

    when i try to compile can u please help me fix

    thanks alot it is so cool i cant wait to show it off

  5. Hi Nick,
    I’ve just received the displays for PONG from China and want to start this very interesting project soon.
    While compiling I got some nice messages like:

    In file included from pongclock_v2_27.ino:20:
    F:\Daten\Privat\Arduino\arduino-1.0.4\libraries\DS1307/DS1307.h:51: error: ‘boolean’ has not been declared
    F:\Daten\Privat\Arduino\arduino-1.0.4\libraries\DS1307/DS1307.h:52: error: ‘boolean’ has not been declared
    F:\Daten\Privat\Arduino\arduino-1.0.4\libraries\DS1307/DS1307.h:53: error: ‘boolean’ has not been declared
    F:\Daten\Privat\Arduino\arduino-1.0.4\libraries\DS1307/DS1307.h:57: error: ‘byte’ has not been declared
    F:\Daten\Privat\Arduino\arduino-1.0.4\libraries\DS1307/DS1307.h:58: error: ‘byte’ has not been declared
    F:\Daten\Privat\Arduino\arduino-1.0.4\libraries\DS1307/DS1307.h:59: error: ‘byte’ does not name a type
    F:\Daten\Privat\Arduino\arduino-1.0.4\libraries\DS1307/DS1307.h:60: error: ‘byte’ has not been declared
    F:\Daten\Privat\Arduino\arduino-1.0.4\libraries\DS1307/DS1307.h:63: error: ‘byte’ does not name a type
    In file included from pongclock_v2_27.ino:21:
    F:\Daten\Privat\Arduino\arduino-1.0.4\libraries\Button/Button.h:34: error: ‘LOW’ was not declared in this scope

    Any idea ??

    If PONG is working (with red LEDs) I will put it into a nice case and sure I will send you pictures.

    Best regards from good old and cold Germany

    • Hello from sunny London… I know, who would have thought!

      Have you got the right version of the arduino software… From the instructions:

      “Important! The pongclock code is not yet compatible with the latest version of the Arduino IDE called 1.0. To get the pongclock software to work, you need to download version 0023 of the Arduino IDE software.”


  6. Hello Nick,

    Thanks for your support, I should have found it out by myself because it’s written in your project file…
    It’s working now and I will try to transfer it into German (month names etc.). Red display is looking great, I will put it behind a coloured Alu plate with red glass as front pane.

    However I did not yet find out how to set time, date or so. Maybe with my 61 years I’m a little bit too old. Can you give me a hint…
    I’m hardware professional but regarding arduino programming it’s only my 4th project.


    • Hey, glad it’s working! To set the clock go to “set clk” in the menu, then use one button to advance the day, hour etc and the other button to step through the items to set. It could be better I admit!

      • Hi Nick,

        I promised to send you pictures of my Pong Clock construction. It’s working since several weeks and looks great.

        As you will see I have used two red acrylic plates. One holds the display and the other stuff and the other plate covers the srews. Recently I have closed the gap between the two plates by clear tape to protect the plates from dust inside. It looks better in reality than on the images.

        Thanks again for that great project


  7. Hey Nick,
    I built my own Pong Clock but am having some troubles setting the time!! Any help would be appreciated!!! Please Help!!!!

      • in case it didnt work I used a breadboard from the start instead of soldering, its still not getting signals

      • For some reason I couldnt reply to your comment below so I really hope you see this one!!! Also I used several different RTC chips none of which worked, but I noticed that the light near Arduino pin 13 isnt blinking, it just stays lit. Anything you could think of to fix it??

      • Strange, I’ve never seen that behaviour reported before and am not too sure what could cause it. Try Dieter’s suggestion.

      • Well, in the beginning I faced similar problems. I changed the RTC and even the 32 kHz quartz without results. In the end I found out that the RTC needed any signal via the I2C lines (i.e. pressing a key) to start generating a pulse on the quartz inputs. This may take a while, but you will only have to do it once (because of the battery).


        Dieter from Germany

      • At first I omitted the coin cell battery just because I couldnt find the right one and decided that it can work without it. However yesterday I bought the coin cell and holder and its still not working. For some reason every time I set the time, it always goes back to the default setting of 00:00 or 12:00 depending if I set it on the 12 hour or 24 hour time. Ive racked my brain trying to think of a solution to why its not working. I know that 1 and 8 are opposite legs of the RTC chip and there was an issue with that in your diagram and I caught that so I know that’s not the problem, I just have no idea what it could be. Is there something you have to do in the coding before using it??

      • Yes you do need the battery – a few other people have tried without it and it doesn’t work.

        Does the clock time change at all? If you don’t set it, it should just work from 12pm on, even if you don’t do anything.

        If you don’t see that, and if the LED on the arduino on pin 13 doesn’t flash every second, you’ll know there may be a problem with the RTC chip in some way. If you look at it with the semi circle to your left then pin 1 is on the bottom left. Check all your soldering too,

        There is nothing you need to do change in the code either, and you don’t need to program the RTC in any way – the main code does that in setup.

        Another thing to try is to see if the power supply is dodgy. Try a different one, or try unplugging one matrix so it draws less power. Someone else had funny results and is was because of this.

        Good Luck!

      • So Dieter, Im a little confused on what to do, there is a key I have to press in order for the RTC to start working?? What exactly should I do??

      • Hi David,

        it was trial and error with my Pong clock. I remember however that the RTC only started to work after it received any signals from the Arduino. And even then it took time.


      • Hmm, that doesn’t sound right, it should just work straight off the bat.

        If the LED isn’t flashing it’s not getting time from the RTC. Could you hook the RTC up on a breadboard to check it? That would eliminate bad soldering etc.

  8. Hi,
    I had a problem a few months ago with my pong clock about not setting the time right and I fixed it! but now the time wont change! I dont know why! I read the troubleshooting and comments to see if I could get any ideas and I noticed the LED next to pin 13 isnt flashing and I dont know how to fix it. The RTC seems to be wired up correctly but I dont know what else I could do. Any Ideas????


    • Hey,

      Hard to say without looking unfortunately. Check the wiring, check the crystal is connected and the battery too – it wont work without those. Also try a different power supply, I’ve heard of funny behaviour with bad PSU’s.


      • Hey Nick,

        So im pretty sure the wiring is all right and the crystal and battery are definitely hooked up. Besides a wall outlet and a computer USB, theres no other power supply I can really give it and it still doesnt seem to work. Is there a specific crystal oscillator I need?? Cause honestly I just picked one randomly off the internet to order…


      • Hey,

        Yes you need one that works with the DS1307 – if it never ever worked that could be a reason why.

        If you google DS1307 you should be able to find the correct crystal specs. Otherwise it’s hard to know what to suggest without having a look.


      • Hey david,

        when I started with the clock construction I faced similar experiences. I used 2 SMD quartzes with nice gold plated housings which didn’t let the clock IC swing. Then I tried a very simple and cheap quartz which you can find in any wrist watch and it worked.
        Check the datasheet of the DS1307 in which you will find which capacity the quartz should have and choose the quartz accordingly
        It will surely work with the right quartz and you will not have to ajust the frequency, which we did 20 years ago with extra trimmers ;–))

        I ordered my quartzes on http://www.reichelt.de which is my favourite dealer. At least you will find any kind of specs there. I hope they have their website in English…

        Regards from Bavaria in good old Germany


      • Hey guys, thank you so much for all the help…I ordered a 32 kHz crystal and it came and i tried it out and it works!!! I am so happy thank you guys for everything and I would have never been able to figure this out without you guys!!!

  9. Hi David,

    Congratulations and well done ! Sometimes the cheapest crystal is the best…

    Best regards

  10. Found it. Just needed daylight and a cup of coffee. Nice clock, and looking forward to the arrival of displays for my pong clock.

    • Great to hear it’s working, and great you are making the pong clock too.

      Ah what did you have wrong with your displays? Martin (few posts below) had his displays 90degrees wrong – maybe it’s related?


  11. Just the way my matrices were connected, with DIN on the right-hand side. I reordered the addresses in “void plot (byte x, byte y, byte val)”.

    Re: Martin. I’ve seen some matrix modules on ebay that were oriented off 90 degrees; I think they’re based on the DIP MAX7219, rather than the SMD version. If that’s not the issue, I would love to find a software solution to rotate numbers 90 degrees for a vertically oriented clock…

    Had to laugh when I saw “//// vain attempt to modify __TIME__ for fudge factor.” Have tried the same, settled for char* time = “06:25:00”; // set ahead to fudge for compile and upload
    ds1307.adjust(DateTime(__DATE__, time));

    Also highly recommend the DS3231 RTC. It’s almost drop-in with DS1307 libraries (one exception: if(! ds1307.isrunning()) won’t work) and much more accurate. Can also get approximate temperature from it. And no fussy crystal needed.

    Pong clock is great. Added a piezo beeper and some minor mods; your documentation is excellent and makes it easy. Thanks.

  12. Ah that makes sense! And that makes a lot of sense for Martin’s issue! I couldn’t think of a way that would happen unless the actual matrices were wired differently.

    If it helps, all my printing to the display is done through the: void plot subroutine. In there you can see how it picks which of the 4 displays depending on the x coordinate and then turns that coordinate into an x value of 0-7 range for the particular display.

    You’d just need to fiddle with this subroutine by swapping the x and y stuff around to rotate everything 90 degrees.

  13. Hey Nick,

    Great pong clock. I’m currently working on building one from your design. I do have question? If I wanted to add a temperature sensor how would I go about it and what coding would I need? I’m new to the world of Arduino.



    • Hey,

      Really cool you are making it. Hard to say about the temperature stuff without doing the work, but I think you can get a temperature module that also runs on 12C. You may even be able to get one combined with a clock module.

      Then you’d have to read in the temp and add an extra menu item to show it, or maybe interrupt the time loops every X seconds to display it by calling your showTemp function.

      Finally you;d have to adapt one of the clock modes to actually show temperature. That shouldn’t be too hard as all the characters are there, just need to print them on the display.

      It is quite a bit of work to be honest, but not so hard if you are into the coding.

      I think someone out there might have done it already but I can’t remember who!

  14. Nick I have built the clock as per your instructions but I am not having much success. The seconds are displayed on the left most display both “:” are displayed on the 2 middle displays.
    Do you have any idea what I can do to solve the problem? Do you have an email address I can send a small movie of what’s happening?

  15. Ugh… I can even get past verifying the Pong Clock…..

    Is the 1.6.5 engine the problem??

    Build options changed, rebuilding all
    Using library ht1632c in folder: /Users/nick/Documents/Arduino/libraries/ht1632c (legacy)
    Using library Font in folder: /Users/nick/Documents/Arduino/libraries/Font (legacy)
    Using library Wire in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire
    Using library RTClib in folder: /Users/nick/Documents/Arduino/libraries/RTClib (legacy)
    Using library Button in folder: /Users/nick/Documents/Arduino/libraries/Button (legacy)

    /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/Users/nick/Documents/Arduino/libraries/ht1632c -I/Users/nick/Documents/Arduino/libraries/Font -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire -I/Users/nick/Documents/Arduino/libraries/RTClib -I/Users/nick/Documents/Arduino/libraries/Button /var/folders/w0/1ypcl96j31q1y54h1b58fcnm0000gn/T/build7807232187475855979.tmp/pongclock5_1.cpp -o /var/folders/w0/1ypcl96j31q1y54h1b58fcnm0000gn/T/build7807232187475855979.tmp/pongclock5_1.cpp.o
    In file included from pongclock5_1.ino:45:0:
    /Users/nick/Documents/Arduino/libraries/Font/Font.h:4:35: error: variable ‘myfont’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
    unsigned char PROGMEM myfont[80][5] = {
    /Users/nick/Documents/Arduino/libraries/Font/Font.h:94:39: error: variable ‘mybigfont’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
    unsigned char PROGMEM mybigfont[10][20] = {
    /Users/nick/Documents/Arduino/libraries/Font/Font.h:108:38: error: variable ‘mytinyfont’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
    unsigned int PROGMEM mytinyfont[42][3] = {
    Error compiling.

    • Yes I think that could be a potential problem, they do change things between versions. I think I wrote in the readme in the download what version I tested with (can’t check as not near a computer) but see if you can find it and use that version of the Arduino software.

      • Nick – I have updated the code – can you test with Arduino v1.6.5 for me? Download the miniclock code again from the link on this page, then replace the FontLEDClock folder you already have in your libraries folder with the new one from the download. Let me know if it compiles OK!

      • That’s annoying. I will try and see about getting the code to work with the latest Arduino version later this week.

  16. Hello Nick. Thanks for sharing all your hard work with everyone. I was wanting to give my mom one of these for her birthday and change the code to automatically be in 12 hr mode for her. however, when this is done from “bool ampm = 1;” , the colon gets formated wrong when the hour digits are less than 10 . one “static” looking colon on the right and one blinking seconds next to it on the left. When the am/pm mode is set on the clock it works fine . Any help would be greatly appreciated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s