Pong Clock

Introduction

This clock uses the classic video game Pong to tell the time. The 2 players automatically win and lose so their scores show the hours and minutes. It’s not too hard to build and should cost less than £60 / $100. All the parts are easily available on eBay and the software code is free!

The clock has lots of different display modes to choose from:

  • Pong Clock
  • Large Digits
  • Time written in words, e.g. “Ten Past Twelve”
  • Time and date with seconds
  • Time and date with seconds and a slide effect
  • Time and date with seconds and a jumbled character effect
  • Date display with printed retro flashing cursor effect
  • 12/24 hour option
  • Brightness option
  • Random clock mode option (changes the display mode every few hours)
  • Daylight saving option to add an extra hour
  • Push button driven menus for setup & display selection.

The project uses 2 bright LED matrix panels from Sure Electronics. You can choose between green or red panels with 3mm or 5mm LED’s . An Arduino runs the main code and a DS1307 clock chip  keeps time, even when the power is off.

Parts List

  • 2 x Sure Electronics 2416 LED Matrix panels These are 24×16 pixels and come in red or green with 3 or 5mm LEDs. Make sure you get the version based on the Holtek HT1632C driver chip. People have found other displays with the HT1632C chip that work too such as this one. But you may need to flip the image in software. (Details for how to do this are at the end of this article.)
  • 1 x Arduino Uno / Duemilanove / Dicecimila with ATmega 328 CPU
  • 1 x DS1307 or DS3231 real time clock chip and IC socket
  • 1 x Crystal oscillator for the DS1307 / DS3231
  • 1 x 3.3v coin cell battery and battery holder for the DS1307 / DS3231
  • 1 x Arduino prototyping shield
  • 1 x Breadboard and jumper wire for testing (or if you don’t want to solder)
  • 1 x 16 Pin IDC Socket for the display connection
  • 2 x Push to make buttons
  • 1 x USB Lead
  • 1 x Mains to USB power adapter
  • Plus wire, solder, tools, time, sweat, tears, etc.

Alternatively a number of users have made very cool PCB’s for the entire clock that do away with the need for the Arduino and prototyping shield. You basically build an Arduino and clock all on one board. To get hold of them mail:

Gary’s custom PCB on the left, Kevin’s on the right.

Parts in Detail

Sure 2416 LED Matrices

You can get these from eBay or Sure online for around $20 each in red or green with 3mm or 5mm LEDs. My clock in the video is made with the 3mm green displays. Some people have had success with other boards based on the HT1632C driver chip, if you are lucky it will work straight off, or you may need to flip the display in software. The displays use a serial protocol called SPI to receive data.

Sure 2416 LED Matrix with HT1632C.

 

1 x Arduino Uno / Duemilanove / Dicecimila with ATmega 328 CPU

The Arduino microprocessor runs the clock software, plus has inputs and outputs we connect to the displays, buttons and clock chip to. Ensure you get an Arduino with the ATmega 328 CPU. You can get Arduino’s for about $30. Try places like Adafruit, Sparkfun Electronics, Cool Components, Seeed Studio or eBay.

Arduino ‘Diecimila’ with ATmega 328 CPU.

 

Arduino Prototyping Shield and Header pins

The prototyping board or ‘shield’ plugs on the top of the Arduino making it easy to add other components. It brings the Arduino’s input and output pins onto a circuit board that you can solder things to. Get a board which is designed for a chip to go on, as we’ll need this for the clock chip. I.e.the board has an area that brings each pin of the chip out to a solder pad you can connect wires to. (You can see this area on the bottom left of the board in the picture below.)

Again places like Sparkfun or eBay are good sources for them. You should be able to pick one up for $15 – $20. Check you get the black header pins too as some boards are sold without them. These are the pins that you solder to the edges of the board so it can plug into the 2 rows of sockets on the Arduino.

If you don’t like the idea of soldering, you could get a breadboard and jumper wire to build the circuit on temporarily instead. This is a good idea anyway to test it’s all working anyhow.

 

DS1307/DS3231 Real Time Clock (RTC) chip, Crystal, 3.3v Coin Cell Battery & Holder

The clock chip keeps time, regulated by the crystal. It uses something called the I2C protocol (pronounced “I squared C”) and only needs 2 wires to send time data to the Arduino.  The battery powers the chip if the clock is unplugged, so it remembers the time when you turn it back on. I found all these bits on eBay bundled as a kit for $10.

16 Pin IDC Socket

The Sure display panels come with ribbon cable that needs to connect to a socket like this. We’ll solder it to the shield so we can plug the display ribbon cable in. They are a couple of dollars on eBay. If you aren’t planning to solder, you don’t need this.

‘Push to Make’ Buttons

These are used to set the time / change the display mode. You can get a pack on eBay for a dollar or two. Any buttons will do, I got these ones that mount on the shield.

pcbswitch

USB Lead – Type “A to B” 

This is needed to to program the Arduino, and then as a power lead for the clock.

 

Mains to USB Power Adapter

This is used to power the clock and you can pick them up for less than $10. Look for one with an output of 150mA or above.

Circuit diagram

This is how it’s all connected…. not too difficult.

Circuit Diagram Pong Clock Schematic

IMPORTANT!

Due to my crappy skils at diagrams the schematic above is missing 2 things:

  1. The 2 push buttons are not shown in the above diagram. You will need to connect one button between Arduino digital pin 2 and GND. The other button needs to go between Arduino digital pin 3 and GND.
  2. The pin layout on the DS1307 is not exact. Pin 8 should really be top right opposite pin 1. All the pin numbers are correct in terms of what they connect to however, so follow the pin numbering and you’ll be fine.

Connecting it up

LED Displays

There are only 4 wires needed between the Arduino and the first LED display. Two more wires are required for power.

You’ll notice each display has 2 connectors on the back. These are for daisy chaining multiple units together as we are doing. It’s what the little ribbon cable in the box is for. Connect the displays together using the ribbon cable. You can use either connector on the back – they are wired the same.

Use one of the free connectors on either display to connect to the Arduino. Again it doesn’t matter which one. For testing purposes I poked jumper wires from the Arduino into the ribbon cable connector. When I was happy things were working, I soldered the IDC socket to the prototype shield, meaning I could plug the ribbon cable in.

As on the wiring diagram, Pins 4 and 5 on the Arduino need to connect to pins 1 and 2 on the display connector respectively. These are used for something called Cable Select or ‘CS’. Cable Select determines which display listens when the Arduino is sending data out. The displays have small DIP switches to set their cable select address – essentially giving them different identities. Set one display’s switch to have CS1 on , and the other to have CS2 on. If your displays light up the wrong way round, just swap their identities using these switches.

Pin 10 on the Arduino is used to send the actual display data and connects to pin 7 on the display. Pin 11 on the Arduino sends a clock signal. Connect this to pin 5 on the display.

Finally connect pin 12 on the display connector to positive and pin 11 to GND.  Alternatively if you prefer you can use the screw terminals on the back of the display for power.

A display with dip switch set as number 1.

Clock Chip

Connect pins 5 and 6  from the DS1307/DS3231 to Arduino pins A4 and A5.

Connect the crystal  between pins 1 and 2 on the DS1307/DS3231. The crystal regulates the clock and can be connected either way round.

Finally the coin cell battery’s positive terminal connects to pin 3 on the clock chip and the negative terminal connects to GND . The battery runs the clock chip if the power is turned off meaning you don’t have to reset the time. It should last for many years. I’ve had reports of people saying their clock doesn’t tick, only to find out they have omitted the battery, so don’t skip this!

Push Buttons

Connect one push button between Arduino digital input pin 2 and GND, the other between Arduino digital input pin 3 and GND.

Power

We’ll supply power in using the USB port on the Arduino and then connect everything to the Arduino’s 5v and GND pins. Connect the 5v pin from the Arduino to the 5v pins on the display and DS1307. Then connect the GND pin from the Arduino to GND pins on the display and DS1307.

A word of caution with the power: Don’t use a higher voltage supply into the Arduino’s round power jack. The Arduino’s onboard regulator will not be able to cope with the power demand the displays draw. If you try you’ll notice the Arduino will get very hot very quickly and probably not last too long!

Also be very careful if you are powering the clock from your computer’s USB port for testing. You could easily damage the port if you have a connection wrong or if the computer can’t supply enough juice. I powered my setup with my Macbook for testing and all was well, but be warned!

 

Prototyping shield

The prototyping shield plugs into the Arduino making it easy to add components. On a standard prototyping board you should have room to solder the DS1307 clock, crystal, battery, buttons and the IDC socket for the display ribbon cable.

I can’t really give instructions for what to solder where, as prototyping boards vary quite a bit depending on what you buy, but you should be able to figure it out based on the circuit diagram.

When things are soldered it should look something like mine in the picture. You can see the IDC plug on the left for the display cable, in the middle is the DS1307 clock chip. The tiny silver capsule below the chip is the crystal. On the right is the coin cell. Below that are the 2 push buttons for setting the mode and time. The red button is a reset button which came in the pack with the shield. It’s useful as the shield covers up the reset button on the Arduino itself.Shield populated

Below you see everything connected together. The 2 displays plug into the prototyping board which sits on top of the Arduino. Nearly done!

connected

Uploading the Clock Code

The last job is to upload the clock code to the Arduino. First you’ll need to download the Arduino programming software called the Arduino IDE. The current clock code was tested with IDE version 1.6.5. Later versions may not work. You can download the IDE from Arduino’s site here: http://arduino.cc/en/Main/Software

Once the IDE is installed, download the clock code from my page on GitHub by clicking the “Download Zip” button bottom right.

Unzip the clock code zip file. Inside you will see the main clock sketch called pongclock5_1.ino and 4 library folders called ‘Button’, ‘RTClib’, ‘Font’ and ‘ht1632c’. These libraries are extra bits of code needed by the main clock sketch.

Next install the libraries: When you installed the Arduino software it should have created a folder somewhere for your sketches (projects) to go in. Find that folder and see if there is a folder called libraries inside. If there isn’t, create one. Then copy the 4 library folders from the zip file into the libraries folder. After you have done that quit and restart the Arduino IDE to make it pick up the new libraries.

After restarting, go to the Sketch -> Import Library menu. If the libraries are in the right place you should see their 4 names listed in this menu.

Now go to the File menu and open the main pongclock sketch – the file ending in .ino. You should see the main clock code appear in the window. Now pick your Arduino Board Type in the Tools -> Board menu. Then hit the Verify – the check mark icon. This tests the code and should compile without errors. If you do get errors here, you’ve most likely not got the 4 libraries in the right place.

OK, time to upload the code to your Arduino. Unplug the Arduino from the clock prototyping shield and plug it into your computer with the USB cable. Click upload and wait for the code to be uploaded. Watch the TX and RX LED’s on the Arduino flash for signs of data transfer.

Finally unplug the Arduino from the computer and plug it back into the prototyping shield and displays. Then plug the USB lead from the Arduino into the mains to USB adapter.

All being well the display should spring to life. Use the buttons to set the time and then sit back and admire your handiwork!

normal 
menu2 
words 
startup 
pong 
play 

Troubleshooting / Flipping the Display

Help, my display is back to front / upside-down!

Normally this means you are using a different brand of LED matrix that is wired differently. If you find everything is reversed (numbers backwards etc) you need to add a couple of lines to tweak the code.

Load up the main pong code in the Arduino IDE. Search for this line:

void ht1632_plot (char x, char y, char val)
{

This is the function that plots points on the display. If your display is upside-down add the following just below:

y = 15-y;

Or if your display is back to front add:

x = 47-x;

Or add both lines if you display is both back to front and upside-down. Finally find the line in the code that starts:

byte get_shadowram(byte x, byte y)
{

And add the same changes just underneath that line too.

I get an error compiling

  • Check the libraries are installed in the correct folder and appear in the libraries menu
  • Make sure you have restarted the Arduino IDE after adding the libraries.
  • Check you are using Arduino software version 1.6.5.

I get an error uploading to the Arduino

  • Check your board type and serial settings are correct in the Tools menu.
  • Check your Arduino has 32K RAM or more.

The clock doesn’t change

  • Often a wiring issue. Check the LED on Pin 13 of the Arduino flashes. If not then the clock chip is not being read. Check your connections to the DS1307.
  • Connect the clock to a computer running the Arduino IDE. Click the serial console button and set it to 57600 baud. You should see the time being printed to the console if the clock is being read. Check the wiring as above if it’s not.
  • You must have the coin cell battery connected for the clock to work.

The displays don’t light up

  • Check your wiring to the ribbon cables and check the display is getting enough power.
  • Try another power supply.
  • Remove one display and see if you get half the screen. If you do, then most likely not enough power is being supplied.

The 2 displays show the same half of the clock or the displays are the wrong way around

  • Check the DIP switch settings on the displays are as per the instructions – one set to CS1 and the other CS2. If the displays are the wrong way around, change the display set to CS2 to CS1 and the other from CS1 to CS2.

The text display is garbled after upgrading to 5.1

  • Make sure you have replaced the font.h library file with the new one in the 5.1 download.

If you have very old Sure LED Displays

The old LED displays from Sure used a different type of LED driver chip called the Holtek HT1632. You can tell these displays as they have the chips on the front of the LED board. If you have these, you need to replace the ht1632c.h library file in the normal clock code download with this file. Quit and relaunch the Arduino IDE to pick up the new file, then load up the main pong clock .ino sketch file. Next look for this line near the top of the code:

#include <ht1632c.h>

and change it to…

#include <ht1632.h>

Then verify and upload the code as per the instructions above.

 

French version of Pong Clock with Space Invaders, Sleep Mode & more!

Thanks to Matock who has taken my original pong code and done some more awesome stuff with it, including extra modes like space invaders and a sleep timer. He’s also translated the text to French. If you want an English version you’ll need to ask him nicely in the comments to change bits back! See below for the full list of his changes and a download link:

* French translation with French accented letters
* adding the Invaders mode based on the work of Richard Shipman on the Wolf’s Spoor bloghttp://pcbo.dcs.aber.ac.uk/blog/projects/arduino-pong-clock/
* adding a “Special Event” function to display a welcome message every 15 min on specific days (ex: New Year Day, Christmas, etc…, cf. is_special_event() function)
* adding a sleep mode defined in a setup sub-menu with sleep and wake-up hours, to reduce the power consumption during the night (<70mA for Arduino Uno)
* setup data are persistent (stored in the EEPROM memory)
* refactoring of the code (reorganisation, clean unnecessary variables, maximum use of const, optimisation of variable memory space)
* some fixes (array sizes, stack overflows, mistypes…)

Matock’s version is called 5.1FR. Here is his download link.
https://dl.dropboxusercontent.com/u/17125497/PongClock-v5.1FR.zip

Thanks…

Thanks to everyone who contributed, including WestFW on the Arduino forum for providing the initial LED driver code, SuperTech-IT over at Instructibles, Alexandre Suter for help with the conversion to Arduino 1.0, Richard Shipman for the lower case font, Matock for the updates & Kirby Heintzelman for all the testing!

655 thoughts on “Pong Clock

  1. Pingback: LED Pong clock - machine quotidienne

    • Hey Florin, your clocks look great.Did you cut your plastic enclosures yourself? I was thinking of trying some semi opaque plexiglass so you just see the diffused LEDs.

  2. Looked at it for approx. 30 secs, and decided I _MUST_ build one myself.
    Just Ebay’ed the sure-elec led panels.
    Happy days!

    • Hi,

      The Sure display based on the 1632 suffers from getting very dim when a lot of the LED’s are on, whereas their board based on the 1632C doesn’t have this problem. As far as I know it’s because the 1632 needs additional driver circuitry which Sure didn’t implement. The newer 1632C has it built in.

      Nick

      • Thanks Nick

        Do you believe then that your code will work with the 1632 displays but the displays will perhaps exhibit just dimming issues?

        Mark

      • Yes it will work, but you’ll need a different library for the 1632, and have to make a coupe of tweaks to the main code – I can email them to you if you are interested. (I had it working on the older 1632 boards before I upgraded them to the 1632C.)

  3. Nick

    Yes please send me the code to play with as I have accidentally ordered the 1632 based units and would like something to play with before I can afford the 1632C versions. I am templed by a couple of 32×16 dual colour units though with the 1632C controller.

    I assume that you have my email address.
    Mark

  4. Hi,
    I’ve got mine up and running!
    Atmega328 on breadboard and rtc on a small pcb that I made years ago

    Looks awesome!

  5. Thanks for this project, took a couple of hours to assemble this afternoon – I used a RTC module on a board from bluesmokelabs.com It also took a little while to work out where to connect the switches, your description in the post doesn’t match the photos, but I guess that’s one of deliberate mistakes to keep us on our toes.
    It looks very nice alongside my nixie clocks, and I’ll have to build a case for it next week. Then on to try to program some more modes and maybe an alarm sounder…

    Thanks again

    • Hey great to hear you made one. What confused you about the switches (apart from them missing from the schematic)? Maybe I can make it clearer in the instructions.

      Love to see the case you come up with too.

      • Hi, I guess the confusion is in the connection of the switches.
        You say connect them between A2/A3 and +5V. This should have been between A2/A3 and GND instead.

        Clock is working great here. Etched a custom PCB for this. (so no arduino board needed)
        Like Richard, I also have to workout a case for it. (acrylic probably)

      • Whoops, sorry if that lead you astray – should have checked before I wrote it all up. I’ve changed that now. Thanks for pointing it out.

  6. Pingback: Wolf’s Spoor | Arduino Pong Clock

  7. Hi

    I was wondering if you heard of anyone getting this running using the 5mm version of the 2416 boards. I have been trying, following your instructions to the letter, and I get no where. I do have the 1632c.

    Cheers

    • Hi Todd, I had a quick look at the data sheet and they look the same. (If you load up the data sheet from sure for the 3mm and 5mm models they are the same doc!).

      So I’m not too sure why they aren’t working :(

      • BTW – You could ask on the Arduino forum if anyone has the same displays – there are a few threads about these displays.

        Nick

  8. Thanks Nick

    I figured I would ask you first just in case and the Arduino forums were doing their migration.

    Thanks again for you time.

  9. Pingback: Pong clocks using LED matrix modules - Hack a Day

  10. Pingback: hackaholicballa - Pong clocks using LED matrix modules

  11. Nick, Many thanks for the clock design. After waiting for a couple of weeks for the LEDs to arrive from Hong Kong I now have a red version up and running. http://youtu.be/t0pA_k7Px80
    I did spot one thing on the circuit layout diagram which seems to differ from your photographs. The connections to the DS1307 seem to be the wrong way around. Using your numbering I have:
    pin 5 to +5V
    pin 6 unconnected
    pin 7 to Arduino A5
    pin 8 to Arduino A4

    Many thanks again.

    • Hey Andy,

      Really glad you liked the project and have built one. The red LED’s look great! I wish I had bought the dual colour displays now so I could have a menu option to switch colours.

      As for the DS1307. The pinout I have is 5 and 6 to Arduino, 7 is N/C and 8 goes to +5v. Pin 8 is bottom right on my photo.
      See the chip pinout here: http://www.datasheetdir.com/DS1307+Real-Time-Clocks-RTC.

      Cheers
      Nick

      • Hi Nick
        Agree with the bi-colour LEDs they look great. I might just order one of those from sure and knock another clock together. :-)

        I have the same data sheet and that’s how I connected the RTC chip. Perhaps I didn’t explain very well… The diagram that you have showing the connections between components has the pins on the right hand side of the RTC running from bottom to top, when they should go top to bottom (so +5v is opposite pin 1 for the crystal).
        Hope that makes more sense.
        Cheers
        Andy

      • Ah I get you, diagrams were never my strong point! When I get time I might try and redo it.

  12. Hi Nick,
    I’ve made a few updates to the Arduino sketch, and was going to upload it to the google code project (but couldn’t work out how).
    Have changed the normal_ clock to animate the digits, so when the time changes the changing digit scrolls down off the screen and the new digit scrolls in from above.
    Have also added a couple of Binary clock modes.
    If you’re interested then drop me a note and I’ll forward the updated sketch.
    Cheers,
    Andy

      • Hey Just had a look at your code. I like the new modes -although I’m not sure I’ll ever be able to figure out the time from the binary display!

      • Hi !

        I just saw you pong clock and I must say that it really looks great… I´m using also the 2416 displays but with the older 1632 chip on it. In earlier post I read that you have offered Mark Pepper to send him the code for the old display version. So I would like to ask you if you please can send me the code for the old 2416 displays…. Thank you very much !!!

    • Hey Andy,

      I have been running your modified code for a while.
      Have you seen the new version that Nick has posted?
      Any chance that you will incorporate your ideas into this?
      I did find an odd bug, when setting up random mode. Sometimes the binary clock is off by ten hours after setting it that way, I can’t remember the exact sequence of vents right now, but I was able to repeat it several times.

      Great work though on your additions!

      I love seeing activity. It would be really cool if someone would add a seconds readout to the one mode that has time and date. That area of the panels looks like it has enough space for it, and the blank space looks out of balance somehow.

      Cheers,

      Kirby

      • Hi Kirby,
        Good to hear that you have enjoyed my updates to the pong clock code. Unfortunately I managed to blow my matrices and dont currently have another set to work with, so I cant do any testing. I’ve got another set on the way from China so will take a look once they arrive.
        Cheers,
        Andy

      • Hey Kirby, I saw your post and yeah I see what you mean about the unused part of the display that could have seconds in it. I left them out initially as thought it might be too cluttered. Anyhow, I’ve put them in now. Will give you a shout when the new code is up.

        Cheers
        Nick

      • Nick,

        That’s cool!

        I think think it will look good.

        Maybe Andy can add his special animation of the rolling digits to this “theme” too!

        Good stuff! This really is a very cool project. Wish I knew more so that I could contribute more.

        BTW, I will send you some pics of my proto board that plugs on the back, and if I can get motivated, the box I am putting the whole deal in.

        Kirby

  13. Hi,

    I was having problems understanding how you brought power to the display boards. When I connected the +5V and GND pins from the display boards to the (I’m assuming) the GND and 5V pins on the Arduino. But I do so, the power light on the Arduino goes off (I guess the Arduino board was drawing too much power). Any suggestions?

    • Hey, Yes I connect the +5v from the LED boards to the Arduino’s +5v pin, and GND from the boards to the Arduino’s GND pin. Sounds like you might have a short or maybe your power supply isn’t up to it.

      Make sure you use a good mains to USB power adapter and connect it to the USB port, or connect a 5v supply to the +5v and GND pins. Don’t use the round power jack on the Arduino.

      Nick

      • Nick,

        After retrieving a mains to USB power supply (+5V) there was still no change. So connecting the +5V and GND pins from the display board to the POWER +5V and GND pins should work? Once the +5V pins are connected, the Arduino (Uno) board’s “ON” light cuts off.

        DJ

      • Yes that should work unless you have a short. Both the LED boards and the arduino need 5 volts, so it’s just a case of connecting them together. Have you got a circuit tester – maybe test to see what happens to the voltage when you connect the LED’s.

        Nick

  14. Hi i saw this thing and its awesome, now i want to build one my self, Can i connect 4 display modules to make the hole thing bigger? can i use the same code for that?
    I am new with programing, but i want to lern how to do.
    Sorry for my English, i am from Sweden.
    Best regards Axel

    • Hey, glad you like it. 4 displays would need quite a bit of changes to the code, but you could get the bigger 5mm LED versions of the displays, I have the 3mm ones which are smaller.

  15. Hi, great idea. Very classic and great for gamers! Im curious about turning your idea into a table. That way my coffee table would display the time and play pong as well. Would there be any changes necessary to make it work as effectively as it already does? Thanks

    • I guess it depends on what you wanted to do. You would maybe have to design new display boards so they could drive individual LED’s to mount in the table. That could be quite a bit of work.

      Nick

  16. Hi there, been struggling for a while to get this running before i realised I’m using the ht1632 boards rather than the 1632c. Could you possibly email me the code for the older boards?

    Dave.

      • Cheers for that, got the code compiling fine and got the heartbeat on pin13 but no output to the matrix. I’m using the red ht1632 boards, any configuration tricks for them? had a few other demo’s working and I know my RTC works.

        Dave.

  17. Nick,

    Okay I figured out that some of the connections on my display board wasn’t set up correctly. I have the boards showing up now. Question, is there a way to actually have 2 players be able to play?

    • That would take some coding and figuring out how to attach 2 controllers to the analogue inputs, it’s possible with some research. There are probably some tutorials on the Arduino site that might help.

      Glad you got it up and running though

      • Nick,
        Do you think there is a way to be able to run the game independent of the clock? I don’t have the necessary parts for the clock. I’m doing research right now also trying to figure out how to possibly use 4 push buttons (2 for each player to move up and to move down).

      • It’s possible, but you would need to change the code significantly.

        Nick

  18. How can I program four push buttons two for each paddle for a pong game. One being used to move the bat up and the other bat downward? Any ideas would really help!

    • You’d need to wire them up to 4 spare input pins, then re work the code so it moves the correct paddle up or down, plus you would need to change the scoring, and either strip out all the other clock stuff or add another ‘Game’ mode. I.e. it’s quite a bit of work!

  19. Ok I understand, now in terms of your project I have been able to get it up and running which is fantastic by the way. The only issue I am having is setting the clock. It keeps saying oo:00?

  20. Hi, wow!, what an amazing clock, superb code. I just built one myself. Built a simple but effective case using a perspex sandwich design similar to dotklok casing. Keep up the good work, I just love arduino.

  21. Hi Nick,

    You sent me a copy of the code for the older ht1632 controller. I made the changes to the Arduino PDE pong code as per your instructions and replaced the HT1632 file. After uploading to the Arduino and making sure the board was wired up correctly to the display, we had lift off. (Or not). Nothing displayed.

    There seems to be a number of versions of the HT1632 file floating around for the 2416 display on the WWW.

    Did you get this code working with the older 2416 Green displays. I know the displays are OK as I tried them with a Amicus18 board on another project. Any additional help would be appreciated.

    Thanks

    Kevin

    • Hi Kevin,

      Yes I had the older versions of the board initially and that was the code I used. I’ve also sent the email you have to a number of other people who have had success using the older displays.

      Hard to say what is wrong with your setup. Do you get the flashing LED on the arduino to show the clock is ticking?

      Nick

    • Hmm. OK just to make sure – this is the LED that is connected to pin 13 on my Arduino. It should flash on when powered up, then stay off for the “Clock version x.xx” message, then start flashing every second when the clock goes in to pong mode.

      With the display not connected it will stay off (just tried it). Really difficult to say without looking at it. You might want to see if the demo code from westFW here (see reply 8) works. You may need to adapt the pin numbers. That’s the basics of the library. If not maybe the displays are wired wrong.

      http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225239439/all

  22. Hi Nick,

    Yes we are talking about the LED that is connected to pin 13. It it comes on, flashes for a few seconds and then remains on. The same result is seen even with the display not connected.

    In terms of the demo file you refer toy, loaded this up and no problems. Worked are described. So either Windows 7 64bit is having a spooky effect on the compiler or my wiring is going wrong somewhere.

    Spent ages on the Arduino.cc forum for these displays, a lot of people have a lot of fun with the older 2416 Green units. A couple of the demos produced a mirror effect, seen this before withe Amicus18 , found a fix for the Amiucus and finally the Arduino.
    I shall do a bit more work on it later this week, just started working on Nixie Tubes. Even more fun and some interesting high voltages. Still all good fun.

    Will let you know if I have any luck, thanks for your help.

  23. Hi Nick !
    You helped me some weeks ago already and I am really happy with your clock. I used the more exactly working DS3231 real-time clock, and added a DS18B20 for showing the temperature…. So far so good. My question is hopefully without sounding to impudent :
    I have 4 of the old yellow Sure 0832 displays and I would like to use them instead of the two 2416 displays. Is there a chance that you can adapt your code for the 0832 displays ? ? Of course you wouldn´t do this for free !!

    Regards

    Sven

  24. Sven, if I may: you can also read the temperature from DS3231.
    As for the 0832 displays, there is also a mechanical challenge in making a bigger matrix. Would be nice to see how you solve that.

  25. Hi Florin ! Yes I know about the possibilty reading the clock from DS3231. But I am afraid that if it is built in a frame the temperature inside will give wrong values and I am not able to measure anywhere outside…. Why is it a mechanical challenge ? I would like to use 4 0832 instead of 2 2416 displays… so the height/dots is the same but it is more width/dots. Like this one here but with the pong clock :http://www.makehackvoid.com/member-projects/ht1632-avr-library-interface-ht1632-led-driver-ics-and-avr-micro-controllers
    Regards

  26. You are right about the temperature inaccuracy, especially if it’s inside of an enclosure, the values are skewed.

    In the video you pointed to, there is a gap between the 2 0832 displays. That is because the displays have the PCB extended so they can be attached (with screws) to something. You would eventually need to cut those extensions, then somehow “glue” the 2 displays together. Not impossible, but challenging (and requires a bit of careful work).

  27. Hi Florin !
    I have already cut the extensions and attached the 4 displays together so that there is no gap :-) My problem is the rewriting of the code that splits the information to each of the 4 displays…. Therfore I need somebody :-)

    Regards Sven

  28. It’s nice to hear you managed to get rid of the gap. I would like to see your solution.

    From what I imagine, the change in the code consists in talking to 4 different HT1632 chips (each controlling a 0832 display) rather than just one (controlling the 2416 display). You will have one CS line to each of the 0832 displays (whose address also needs to be set, with the switches).
    A bit of work, but not “rocket science” as they say :)

  29. Hi Florin !
    It´s not that complicated… I had to rasp about 0.8 mm on one side of that v -cut point to get them a little closer. I used my small milling machine for that and it took about 5 minutes. Then I soldered a srew with its head down on that silver mounting holes and connected them with the peaces of v-cut material I broke away before (cut them into to the right lenght,drilling holes, and fixed them with a bolt). All together less than an our of work :-) Comming back to my question :-) and asking you directly : Are you able/willing to rewrite the code for me ?

    Regards
    Sven

    • Hey Sven,

      Thinking about this there are 3 steps needed to get the code working…

      1) Replace the current HT1632C driver library with the HT1632 driver – I have this already so not a problem,

      2) As Florin says, we will need to re-write the driver parts of the code to cope with 4 displays. I.e. if the main part of the code is trying to plot a pixel at y=9, then it needs to know to plot it as pixel 1 on the second display. I can try and do this for you – but it may be hard to test without 4 displays to hand.

      3)Tweak all the various clock routines so they are adapted to the new screen size as you are effectively adding 16 pixels width. – I don’t think I will be able to do this without having 4 displays, so I may have to leave it for you to play with.

      Cheers
      Nick

  30. Hi Nick !

    Of course I understand that it may be hard to do this without having the displays !!
    I did step 1 already and currently using your code with slightly changes on the 2 2416 displays. It sounds great to me that you give it a try to do this !! …and of course I will and have to play with it !
    Regards
    Sven

    • Hi Sven,

      What version of the display do you have? I need to get the datasheet from Sure, but from a quick look they seem to list the HT1632C versions only. Do you have that version or the older HT1362 version?

      Nick

  31. Sven, I uploaded this “draft” version for you:
    http://code.google.com/p/wiseclock2/downloads/detail?name=Sure0832x4.pde&can=2&q=#makechanges

    You will also need to download the font3.h file:
    http://code.google.com/p/wiseclock2/downloads/detail?name=font3.h&can=2&q=#makechanges

    I just compiled the code. I did not have the slightest chance to test it (I don’t even have an 0832 display around, plus it’s a Sunday :). You give it a try and let me/us know.

    Even if it works, the digitalWrite() functions will need to be replaced with their “optimized” version.

  32. Hi Florin !
    Thanks a lot !! You are more than fast :-) I just downloaded it and will try it this evening.
    Unfortunately I can´t try it now because I have to work ;-)
    I will let you know the result….

    Sven

  33. Not bad, for a first, blind, try.
    It seems that displays 1 and 2 are accessed correctly.
    In function displayScrollingLine, you need to make some changes. I left the second param as 0, but it should have been really “y”, and its value, set at the top of the same function, should be between 0 (top of the screen) and 10 (let’s say).

    ht1632_putchar(-x+6, 0, ((crtPos+1 < strlen(msg)) ? msg[crtPos+1] : ' '));
    should be
    ht1632_putchar(-x+6, y, ((crtPos+1 < strlen(msg)) ? msg[crtPos+1] : ' '));

    etc (same for the rest of the line).
    I think you got the idea.

  34. Hi Florin !

    I changed the code to this here :

    void displayScrollingLine()
    {
    // modify this value to display the text on the desired display row;
    int y = 4;

    // shift the whole screen 6 times, one column at a time;
    for (int x=0; x < 6; x++)
    {
    ht1632_putchar(-x, 0, msg[crtPos]);
    ht1632_putchar(-x+6, y, ((crtPos+1 < strlen(msg)) ? msg[crtPos+1] : ' '));
    ht1632_putchar(-x+12, y, ((crtPos+2 < strlen(msg)) ? msg[crtPos+2] : ' '));
    ht1632_putchar(-x+18, y, ((crtPos+3 < strlen(msg)) ? msg[crtPos+3] : ' '));
    ht1632_putchar(-x+24, y, ((crtPos+4 < strlen(msg)) ? msg[crtPos+4] : ' '));
    ht1632_putchar(-x+30, y, ((crtPos+5 < strlen(msg)) ? msg[crtPos+5] : ' '));
    ht1632_putchar(-x+36, y, ((crtPos+6 = strlen(msg))
    {
    crtPos = 0;
    }
    }

    Again a link what it looks like :
    http://imageshack.us/clip/my-videos/696/uavt.mp4/

    I will put the displays back together again… it´s not nice this here :-)

    From wednesday till sunday I am not able to test because I do a little trip…

    But I will be online if there is any question !!

    THANKS !!!

  35. Sven,
    It look good to me. In principle, it works.
    Now, do the following 2 steps:
    1. insert these 2 lines somewhere in the file (close to the top):

    #define fWriteA(_pin_, _state_) ( _pin_ < 8 ? (_state_ ? PORTD |= 1 << _pin_ : \
    PORTD &= ~(1 << _pin_ )) : (_state_ ? PORTB |= 1 << (_pin_ -8) : PORTB &= ~(1 << (_pin_ -8) )))

    2. replace "digitalWrite" everywhere with "fWriteA" (arguments to the function will stay the same).
    This should speed things a bit.

  36. Hello! Thanks for posting your project. It was extraordinarily helpful.

    I got the clock working and even added a speaker and alarm mode to it-was a lot of fun.

    I decided to string four of the displays together for a new project. I thought it would be as easy as changing the max x and max y. I was wrong. When I write to the third or fourth display the first and second go besonkers.(any two displays work perfectly on their own)

    Any help would be hugely appreciated. I can post an image if you want to see exactly whats going wrong.

    Thanks a lot!

    • Hey Joel, Glad you liked the project and got something out of it. Yes the code wont’ work as it stands as the driver bits are only written for 2 displays.

      Each display needs it’s own Cable Select line, so first off you would need to wire up the other 2 CS lines from the displays (CS3 and 4) to the Arduino, say on pins 6 and 7. Set each diplay to 1, 2, 3 and 4, then change the code that defines the cs pins:

      static const byte ht1632_cs[4] = {4,5,6,7};

      also at the top you will want to set

      #define NUM_DISPLAYS 4

      and as you say change the max X and Y

      Then, in the ht1632_plot and get_shadowram functions, you would need to tell the code which display (variable d) to write to depending on the pixels you want to plot.

      E.g. if you had all the displays in a line, X would go up to 96. So plotting X=49 you would want that to be on display 2 (displays are numbered 0 – 3). So Just add 2 more if statments after the ones for x values 0-23 and 24-47. I.e. if the displays were in a line, add one for x=48-71 where d=2 and 72-96 where d=3. You also need to change the x=x-24 to x=x-48 and x=x-72
      respectively.

      …and youd need to do the same kind of thing in the function: get_snapshotram

      There might be some other bits I've missed but hopefully that will get you started! Also see the post from Florin, as he is kindly helping someone do the same but with 4 x 0832 displays… the principle there is the same.

      Nick

    • Hey Joel
      I know it was a long time ago you did this but do you still have the code for the alarm part. Im new to this and im not sure im quite up to writing an alarm part for the code. If you do could you upload it some where for me to grab,
      Thanks
      Ben

  37. yes I had the CS lines and #displays. I had just missed the _plot and shadow ram functions. It works now. Thanks a lot for your speedy reply.
    I had read the exchange between Florin and the 0832 displays. I actually have 4 of the same displays. But mine are the newer ht1632c so I figured the code wouldn’t be applicable.

  38. So I attempted to string four of the 3208 in series. I modified all of the same code I did while stringing the four 2416’s together.

    This time.
    #define X_MAX 127
    #define Y_MAX 7

    and
    if (x >= 0 && x =96 && x <=127) {
    d = 3;
    x = x-96;
    }
    In all the right places. It works great except for the fact that it wont print the rightmost 8×8 block on every display. I know this is because the 2416 is 24 wide and something is still set to that width per display. I looked at the code by florinC but because it was for the ht1632 I didn't know how to adapt it.

    I know this line needs to be fixed. But I am too new to this to know how,
    ht1632_sendcmd(d, HT1632_CMD_COMS01); // NMOS Output 24 row x 24 Com mode

    Any advice for where to go would be great.

    Thanks a lot!

  39. Not sure if this helps, but I found this in function ht1632_setup() in my code:

    #ifdef _16x24_
    ht1632_sendcmd(HT1632_CMD_COMS11); // 16*32, PMOS drivers
    #else
    // (fc)
    ht1632_sendcmd(HT1632_CMD_COMS10); // 32×8, PMOS drivers
    #endif

    Basically, you send the first command for the 16×24 display and the second for the 0832 display.

  40. I am using the 3208 32×8 not the 0832.
    I’m assuming other code in the shadow ram methods will have to be changed as well.

  41. Are you sure it’s the HT1632C? The data sheet I found on ebay doesn’t mention it for the newer displays:

    Click to access DE-DP105_Ver1.0_EN.pdf

    Look at page 12 – 3.3. Command Summary.

    Under Common options you will want to set xx in:

    ht1632_sendcmd(HT1632_CMD_COMSxx);

    to the default listed on the page. This command sets up the HT1632 output pins for the display. For the HT1632 version of the 0832 it’s 10 (as in the data sheet above). See if you can find the data sheet for your particular version on Sure’s site.

    Also in the code in all the HT1632 related functions where you see the value of 96, that is essentially
    96 x 8 bits = 768 bits (double the number of pixels on the display). I.e. half of the bits are used for actual display data, the other half for the snapshot. You should change this to double the num pixels on the 0832.

    See if that helps…

  42. Yes I had to change it to 00. I probably could have guessed that :/
    Now it plots the leftmost 8×8. However, it is only plotting all the even columns. Any idea how to fix this? I already changed the 96’s to 64’s.
    Thanks again for your help.

    • Hey, Really hard to say to be honest without having a look at your code.

      Sounds like you are going in the right direction though. Have you written a function where you can plot values and check where they appear on the display?

      Nick

  43. I thought we/you rewrite the pong clock code for 4 0832 displays and the code you wrote is just to do the basic tests ?

    Regards
    Sven

  44. Sven,
    In Nick’s version of the code I have (which may not be the latest), I identified a few places with dependencies on the screen dimensions.
    Here they are (updated with the values for your 64×16 display):

    #define BAT1_X 1
    #define BAT2_X 62

    //very basic AI…
    // For each bat, First just tell the bat to move to the height of the ball when we get to a random location.
    //for bat1
    // (fc) dependent on screen size;
    if (ballpos_x == random(40,62)){// && ballvel_x 0) {
    bat2_target_y = ballpos_y;
    }

    //when the ball is closer to the left bat, run the ball maths to find out where the ball will land
    // (fc) also dependent on screen size;
    if (ballpos_x == 15 && ballvel_x 0)

    Nick may have already modified his code to make use of 2 macros that define MAX_X and MAX_Y.

    Again, I did not test this code (don’t have the setup to do it). If you find a few things awkward, try to understand what the above numbers mean and play with them.

  45. Hi Florin !
    I´ve tried a little bit and it works with some little problems…. :-)
    I have a problem with the clear display function. If I use the pong code that has this definition here

    #define cls ht1632_clear

    I get the error

    void ht1632_clear(byte chipno)
    too few arguments to function ‘void ht1632_clear(byte)

    I deactivated the #define cls and all cls calls and the I was able to upload the first time – of course the display is not cleared then :-(

    Do you have a idea what to do to get the clear display function working ?
    I ´ve uploaded a video that shows the clock….
    THANK YOU

  46. Good job Sven.
    Now, insert this function:

    void ht1632_clear()
    {
    for (int i=1; i<=4; i++)
    ht1632_clear(i);
    }

    and leave the #define cls ht1632_clear in place, together will all calls to cls.
    Basically, we re-defined the old ht1632_clear (with no parameters) function.

    (As before, I did not test this.)

  47. Hi Florin !
    I changed it and now I get another error message:
    Pongclock_v2_28_0832_test.cpp: In function ‘void ht1632_setup()’:
    Pongclock_v2_28_0832_test:41: error: too many arguments to function ‘void ht1632_clear()’
    Pongclock_v2_28_0832_test:303: error: at this point in file
    Pongclock_v2_28_0832_test.cpp: In function ‘void ht1632_clear()’:
    Pongclock_v2_28_0832_test:564: error: too many arguments to function ‘void ht1632_clear()’
    Pongclock_v2_28_0832_test:567: error: at this point in file

    void setup is this here :
    void ht1632_setup()
    {
    pinMode(HT1632_CS1, OUTPUT);
    pinMode(HT1632_CS2, OUTPUT);
    pinMode(HT1632_CS3, OUTPUT);
    pinMode(HT1632_CS4, OUTPUT);

    digitalWrite(HT1632_CS1, 1);
    digitalWrite(HT1632_CS2, 1);
    digitalWrite(HT1632_CS3, 1);
    digitalWrite(HT1632_CS4, 1);

    pinMode(HT1632_WRCLK, OUTPUT);
    pinMode(HT1632_DATA, OUTPUT);

    for (int j=1; j<5; j++)
    {
    ht1632_sendcmd(j, HT1632_CMD_SYSDIS); // Disable system
    ht1632_sendcmd(j, HT1632_CMD_COMS10); // specific to 0832 display, PMOS drivers;
    ht1632_sendcmd(j, HT1632_CMD_MSTMD); // Master Mode
    ht1632_sendcmd(j, HT1632_CMD_SYSON); // System on
    ht1632_sendcmd(j, HT1632_CMD_LEDON); // LEDs on

    ht1632_clear(j);
    }
    }

    void clear is just copy and paste from your post before
    I don´t know if its important but the the arduino ide jumps (orange-highlighted) on the #define FADEDELAY 50 – doesn´t make sense to me…

    Thsnk you !!

  48. Hi there. Im looking for someone to help me create a custom LED project that would need to be very compact. I have a budget and would like to know if you may be interested.

    thanks

    • Probably means you have something wrong in your setup… e.g. you need to copy the libraries from the download into your setup.

      Also make sure you aren’t using an old version of the Arduino IDE.

      Nick

  49. Hello, I’ve been busy with some other things and just got back to trying to get the 32*8 ht1632C displays working. I left off having everything working except that it is doubling the X value of all the positions. So turning on all the values will actually light only the even columns and the zeroth column. I’m not sure where to go :/ It’s probably something with the bitshifting. Anyway, im happy to send you the code if you want. As a thanks I’m happy to send you one of the displays as well.
    Thanks :).

    • Hey Joel, Thanks for the kind offer of a display… I would love to but I just don’t have the time at the moment! If I get a chance I’ll let you know.

  50. This is a really awesome project! I am a site manager on Instructables.com. You should consider submitting this as an entry to our Clocks Challenge. We’re giving away an iPad along with other great prizes.

    You can check out the contest here: http://www.instructables.com/contest/clocks/

    I would be happy to feature it on our site if you decide to post the instructions there and help get it noticed among our 10 million visitors. Let me know if you have any questions!

    Cheers!
    Carley
    carley@instructables.com

    • Hey Carley, Wow, sounds cool! I like the Instructables site.

      Sadly it looks like your competition is only open to the US and Canada. I’m in London, UK, so looks like I’m excluded.

  51. hey nick,

    me and my buddy are making a pop shots basketball game we have a string of 18 leds to keep score, i saw this pong clock so i built one and it works great but for some reason it wont change time i think i messed my ds1307 up but, I was wondering is there any way to add a counter to the program to keep score for our game im pretty sure there is a way my programming sucks though any suggestions

    • Yeah it could well be the DS1307… check all the connections, if they are dodgy it wont read the time.

      I’m not too sure on your game but you could use some bits of my code and reprogram it to make a counter in some way. You would need to brush up on your coding though or get someone who knows a bit about it.

      Good luck!

      • Hi Nick
        Really great project indeed!!

        I have the same idea as “jarell” about building a score counter
        Basically I have a RF keyfob with 2 buttons (A and B) each of them giving points to Team A and Team B.
        So far everything works on the Arduino serial monitor but I am not capable of displaying the results on the led matrix.

        First :
        int scoreTmp =0;
        int score;
        My code detects the state of the buttons and adds 1 for each time the button is pressed:
        if (buttonState1 == HIGH) {
        scoreTmp++;
        }
        Then:
        switch (scoreTmp) {
        case 1:
        score1 = 100;
        break;
        case 2:
        score1= 150;
        break;
        case 3:
        score1 =200 ;
        break;
        default:

        }
        In the arduino Serial monitor I would use.
        Serial.print(score1);

        What should I do if I want to display it on the led matrix?
        void demo_chars ()
        {
        ht1632_putchar(0, 0, ‘score1’, (GREEN));

        ht1632_putchar(0, 8, ‘S’, (GREEN));
        ht1632_putchar(6, 8, ‘c’, (GREEN));
        ht1632_putchar(14, 8, ‘o’, (ORANGE));
        ht1632_putchar(20, 8, ‘r’, (RED));
        ht1632_putchar(26, 8, ‘e’, (GREEN));
        }

        Thanks for your help.

      • Hey Daniel,

        Really sorry it’s taken so long to respond. You can use the putchar function in the clock code…

        Set a message string like so:

        char message[8] = {“SCORE 0”};

        Then put it on the screen using…

        ht1632_putchar(x, y, message[i]);

        Where x and y are the pixel coordinates and i is the letter in the message. E.g.

        ht1632_putchar(5, 5, message[0]);

        would print an “S” 5 pixels to the right and 5 pixels down.

        You can also use the above method with

        ht1632_puttinychar for small characters

        ht1632_putbigchar for the big numbers (there are no letters defined in the font, just 0-9)

        Hope this helps…
        Cheers
        Nick

  52. Hi, great project. I get ” ‘Button’ does not make a type ” when I compile in Arduino.
    What does that mean?
    I’m just about ready to build it. Any help would be greatly appreciated

    Thanks

  53. Oops sorry, I’m so dumb (and french!) When creating the libraries folder I spelt it wrong

    sorry to bother, carry on :)

  54. Hi, me again. Could not wait to build this, did it without the ds1307 chip!!
    /Users/ericdugas/Desktop/pongclock.rtfd/Users/ericdugas/Desktop/pongclock.pdf

  55. Hey Nick,
    just wanted to thank you for this awesome project, i love it !!
    I’d just build one for myself and it looks splendid
    just because of you, i bought my 1st arduino board and now i cant get my hands of it :p
    thank you for that :)
    just a little tini tiny thing… for some reason, the clock freezes sometime and the only fix is to reset the arduino board…. (arduino UNO with SM chip)
    since my 1st attempt, ive switched to Richard Shipman s evolution of your sketch, and i havent run into the problem anymore… weird

    anyway, a BIG THANK YOU for introdcuing me to arduino through this project, and i really hope you ll carry one improving this project and writing some more exciting projects

    cheers ;)

    Poto

  56. Since i really want to give you something back, i made a diagram of all the connection, like the one you have but it s in color (not too much tho…) and i ve included the little changes you talked about (pin number on the DS1307, added 2 buttons). Aswell, in case you are planning on going international, i can translate your instructable in french… tell me if you would fancy that

    cheers again

  57. hey nick,
    after few more tests, it appears that, even with Richards sketch(invaders), the clock freezes at a random time aswell…
    i m lost, i checked connections and all but cant find why thoses freezes happen…
    Have you heard of anybody having this problem or any ideas on how to fix it ?
    thx in advance

  58. Hey Poto. If you leave it in pong mode, does the time freeze or the ball too?

    If it’s the time, I woud check the wiring to the clock chip – power data etc.

    If it’s the whole thing check the wiring to the arduino and make sure you power supply is good, If it wavers it could cause things to lock up.

    Nick

  59. Hey Nick,
    i just checked all that, powered the board through an UPS to really see if the problem was coming from the power… change location aswell, to double check…
    but after some investigations, i suspect the ds1307 to be faulty…
    i’ll order some new parts and i ll check again
    i ll keep you posted

    thx for the support ;)

    Poto

  60. the ball and the time freezes, but sometime i get the time back rght after reseting, some other times, i don’t…
    must be the ds1307

  61. Hey Eric,
    no i havent try that….
    since i know very little about electronic yet, can you explain me why should i do that and what effect will it have on the board ??
    and what pin 5 and 6 are you reffering to ?? the ones on the arduino or the ones on the ds1307 ??

    thanks for your help ;)

  62. Hi Poto, the pins I’m referring to are of the clock chip DS1307. I’m not really sure about the resistor but they are in the datasheet diagram.
    Some kind of pull-ups for the chip to behave normally?
    If you try them, tell me if it helps.

    Eric

  63. well, i ve tried, and it doesnt work at all…
    right now, it s 45:85 on my clock (when on pong mode), and i cant set it right…
    if i change the mode to something else (ex:numbers) the time switches every second 12:62, 45:85; 32:54 …

    Plus, if i am the only one with this problem, why those resistors are en issue with my clock and not the others ??
    i’ll get back to you guys once i ve received the 10x DS1307 i ve ordered…. out of all of them, 1 must work, right ?? :p

    thx for the help anyway

  64. The sketch is pretty much at the bottom of the page.
    Make sure to uncomment the line
    //RTC.adjust(DateTime(__DATE__, __TIME__));
    like so
    RTC.adjust(DateTime(__DATE__, __TIME__));

    I hope this helps

  65. Well, as i was suspecting, the chip and/or the crystal is faulty. I went to the electrolab, an hackerspace in Paris, and they helped me fix it. new ds1307, new crystal, now it works like a charm ;)

    thx for this awesome project, and someone mentioned that they wanted to play real pong on he clock; i love the idea so if i make it happen, you ll be the 1st to know ;)

    thx Nick, thx Eric

    • I don’t know as I’ve not got a Mega. I guess you would have to figure out which pins you could use on the mega (as it obviously has more), and change the code for it.

  66. Hi nick,
    i ve been making a homemade PCB for this project and so far everything works fluiently but a need an information that i cant find anywhere…

    how to change the pin connection between the arduino and the DS1307+ ??
    In your project pin 5 of the DS1307 is connected to A4 and pin 6 is connected to A5, i need to change that, where can i do it ??

    i ve checked the sketch, the libraries and all but no luck … can you enlightened me ??

    thx in advance ;)

    Poto

  67. Hi, have you tried in setup:

    pinMode(x pin, OUTPUT);
    pinMode(x pin, OUTPUT);

    then in loop:

    digitalWrite(x pin, LOW);
    digitalWrite(x pin, HIGH);

    That is what I did in the RTC code as I needed to use Arduino pin 16 LOW (0v) and pin 17 HIGH (5V)

    just a thought! again I might be really off the track here!!

    Cheers

    Eric

  68. Hey Nick

    I’m really keen on building a Pong Clock. I ordered also the parts already. Now I opened the code in the arduino program and added the libraries. Then I verified the code and there was a mistake and because I’m new into this I would like to ask you for some help.

    every time I push verify, i get this error:

    pongclock_v2_27.cpp:18:57: error: WProgram.h: No such file or directory
    In file included from pongclock_v2_27.cpp:20:
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/DS1307/DS1307.h:12:24: error: WConstants.h: No such file or directory
    In file included from pongclock_v2_27.cpp:20:
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/DS1307/DS1307.h:51: error: ‘boolean’ has not been declared
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/DS1307/DS1307.h:52: error: ‘boolean’ has not been declared
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/DS1307/DS1307.h:53: error: ‘boolean’ has not been declared
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/DS1307/DS1307.h:57: error: ‘byte’ has not been declared
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/DS1307/DS1307.h:58: error: ‘byte’ has not been declared
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/DS1307/DS1307.h:59: error: ‘byte’ does not name a type
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/DS1307/DS1307.h:60: error: ‘byte’ has not been declared
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/DS1307/DS1307.h:63: error: ‘byte’ does not name a type
    In file included from pongclock_v2_27.cpp:21:
    /Users/Flo/Desktop/Arduino.app/Contents/Resources/Java/libraries/Button/Button.h:34: error: ‘LOW’ was not declared in this scope

    what did I wrong?

    greets
    flo

    • Hey Flo,

      Glad you wanted to build the clock!

      Looks like the Arduino software has been updated and my code no longer compiles :(

      Download the older arduino IDE – version 0023 from the download page, it should work with that one.

      I’ll have a look at fixing it with the new IDE.

      Cheers
      Nick

  69. Hi Nick,
    Great project! Would you have any example code to do just the ds1307/time display (no pong) on Sure’s DE-DP13112 32×8 display? I’ll have to build the bigger clock though (a friend saw it and fell in love ;), just have to buy the hardware …

    Cheers!
    Don

    • Hi Don,

      Glad you like it. I don’t have any code to hand, your best bet would be to adapt the code that’s in the pongclock sketch itself. The display you mention looks to have the same controller chip, so it should work with the driver functions. You would need to obviously change where stuff was drawn on screen to fit the new display’s resolution of 32×8.

      If you just wanted a bigger clock, Sure do a bigger version of the 2416 boards that use 5mm LEDs. I know a few people have used those with this sketch.

      Cheers
      Nick

  70. Hi Nick,
    Great project, I followed your instructions to the letter and had no problems. I was wondering if it was possible to incorporate an adjustable setting to turn the display off at night. I have a similar option on my Nixie clock.
    Thanks again for one of the best clock projects on the net.

    • Hey Kevin, glad you like it.

      It would be possible to dim the display if you were OK with a bit of coding. In the main clock loop you’d want something a bit like…

      If (hours > 11 || hours < 6 )
      {
      clear_display();
      update_display();
      sleep(1000);
      }

      The above is pseudo code – it won't work as I don't have the stuff in front of me to look at, but it's the kind of thing you'd need. You can also dim the display (I use it in the code to fade the display). You could set it at a very low brightness.

      Hope that points you in the right direction!
      Nick

      Nick

  71. Hi,

    I have tried to compile your script on arduino versions back to 21 but I keep getting the same errors. Any assistance would be appreciated:

    pongclock_v2_27.cpp:1:20: error: Button.h: No such file or directory
    pongclock_v2_27.cpp:2:20: error: DS1307.h: No such file or directory
    pongclock_v2_27.cpp:3:18: error: Font.h: No such file or directory
    pongclock_v2_27.cpp:4:21: error: ht1632c.h: No such file or directory
    pongclock_v2_27:49: error: ‘Button’ does not name a type
    pongclock_v2_27:50: error: ‘Button’ does not name a type
    pongclock_v2_27.cpp: In function ‘void gettime()’:
    pongclock_v2_27:112: error: ‘RTC’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_chipselect(byte)’:
    pongclock_v2_27:123: error: ‘DEBUGPRINT’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_chipfree(byte)’:
    pongclock_v2_27:129: error: ‘DEBUGPRINT’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_writebits(byte, byte)’:
    pongclock_v2_27:141: error: ‘DEBUGPRINT’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_sendcmd(byte, byte)’:
    pongclock_v2_27:165: error: ‘HT1632_ID_CMD’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_senddata(byte, byte, byte)’:
    pongclock_v2_27:184: error: ‘HT1632_ID_WR’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_setup()’:
    pongclock_v2_27:205: error: ‘HT1632_CMD_SYSON’ was not declared in this scope
    pongclock_v2_27:206: error: ‘HT1632_CMD_LEDON’ was not declared in this scope
    pongclock_v2_27:207: error: ‘HT1632_CMD_COMS01’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_clear()’:
    pongclock_v2_27:345: error: ‘HT1632_ID_WR’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_putchar(byte, byte, char)’:
    pongclock_v2_27:386: error: ‘myfont’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_putbigchar(byte, byte, char)’:
    pongclock_v2_27:413: error: ‘mybigfont’ was not declared in this scope
    pongclock_v2_27:421: error: ‘mybigfont’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_puttinychar(byte, byte, char)’:
    pongclock_v2_27:460: error: ‘mytinyfont’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void normal_clock()’:
    pongclock_v2_27:490: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27:494: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void display_date()’:
    pongclock_v2_27:577: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27:577: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27:656: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27:656: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void fade_down()’:
    pongclock_v2_27:710: error: ‘HT1632_CMD_PWM’ was not declared in this scope
    pongclock_v2_27:716: error: ‘HT1632_CMD_PWM’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void fade_up()’:
    pongclock_v2_27:728: error: ‘HT1632_CMD_PWM’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void button_delay(int)’:
    pongclock_v2_27:743: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27:743: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void pong()’:
    pongclock_v2_27:800: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27:804: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void word_clock()’:
    pongclock_v2_27:1199: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27:1203: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void jumble()’:
    pongclock_v2_27:1323: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27:1327: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27:1451: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void switch_mode()’:
    pongclock_v2_27:1478: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void set_time()’:
    pongclock_v2_27:1549: error: ‘RTC’ was not declared in this scope
    pongclock_v2_27:1550: error: ‘DS1307_SEC’ was not declared in this scope
    pongclock_v2_27:1551: error: ‘DS1307_MIN’ was not declared in this scope
    pongclock_v2_27:1552: error: ‘DS1307_HR’ was not declared in this scope
    pongclock_v2_27:1553: error: ‘DS1307_DOW’ was not declared in this scope
    pongclock_v2_27:1554: error: ‘DS1307_DATE’ was not declared in this scope
    pongclock_v2_27:1555: error: ‘DS1307_MTH’ was not declared in this scope
    pongclock_v2_27:1556: error: ‘DS1307_YR’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘byte set_value(byte, byte, byte, byte)’:
    pongclock_v2_27:1593: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27:1595: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘byte set_value_dow(byte)’:
    pongclock_v2_27:1634: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27:1635: error: ‘buttonB’ was not declared in this scope

    • Looks like it can’t find the libraries. Make sure you have put the library folders in the arching libraries folder and restarted the arduino application.

  72. Hi Nick,

    Great project – you have inspired me to make one too :) your clock looks great, I have all the parts needed winging their way to me as well as some perspex to make a stand/case

  73. Hi Nick,
    I love this clock and have built a few for the family. The last one though seems to start up at random. If i turn off with pong running it doesn’t always start with pong when i turn it on although the time is correct.. Could this be a problem with the RTC?
    Have you considered incorporating a atomic clock receiver. I recently attached one to my Nixie Clock, the hardware is fairly simple but i am hopeless with code.
    Thank you again for a great project.

    • Hey Kevin,

      Glad you like the clock! That’s an interesting problem you have. It should start with pong (if I remember right!). I don’t think it would be to do with the RTC. Maybe the power supply could be doing something funny… but I would expect to see other issues if that were the case. Maybe try running it from another power source as a test.

      Not had a look at the atomic receiver … where do you get those from?

  74. Hi Nick,
    I will try a different PSU but to be honest I’m stumped with this one. I get my real time modules from Pete Virica at http://www.pvelectronics.co.uk/index.php Last time i looked they were priced from £6.95. There is also some references on the site to how they work. Would be a great addition to the Pong Clock

  75. Hi Nick,
    I finally found the problem with my last clock. I’ve now designed a pcb specifically for this project called the GURDuino it has a IDC header for the ribbon cable attachement and can be powered by a voltage regulator or +5v psu. I can now use my Duemilanove just for programming.

  76. Hi i saw this clock and have order all the stuff so i can build one myself, i was wondering if it is hard to add a thermometer mode to the clock ?
    I am new to programing but i want to learn becouse you can make so much fun stuff with the arduino.
    Regards Axel

    • Hey, glad you bought the bits. You could add a temperature sensor, but you would probably need a bit of experience coding it in to work with the clock.

      There are lots of guides on the net about reading temperature with an Arduno, I would have a look at what is out there as a first step.

      Nick

    • Hey Lucian, the Pro Mini is based on the ATMega 168 which doesn’t have enough RAM for the sketch. You would have to spend time trying to slim down the code.

      • Hi again Nick,

        I went ahead and built the clock with the Pro Mini (the older ones were ATMega 168, the newer ones come in 328 flavor too)

        Works great, I made a few adjustments like powering everything from a 7805 voltage regulator and capacitor combo (bottom left of breadboard)

        May I ask a question, feel free to tell me to go and learn myself, how would I go about inserting a new mode, that just scrolls a piece of text (one of a choice of 4 say) with the cursor effect you have implemented. I’d like to trigger this every half hour?

        Making the casing at the moment, will upload some pics in due course. Many thanks for the work you put in :)

      • Hey, great to see you got it working.

        As for scrolling text, well. If you just have a short message that will fit on the screen you can adapt the display_date() function…

        Something like:

        void my_message()
        {
        char message[9]={“Hello” };

        //call the flashing cursor effect for one blink at x,y pos 0,0, height 5, width 7, repeats 1
        flashing_cursor(0,0,5,7,1);

        //print the message
        int i = 0;
        while(message[i])
        {
        flashing_cursor(i*6,0,5,7,0);
        ht1632_putchar(i*6 , 0, daynames[dow][i]);
        i++;
        }
        }

        I havent tested the above (and had a few beers) so it may not work, but you get the idea. you will need to call the my_message() funtion from the main loop. If you want it every 30 mins you would need an if statment e.g.

        if (rtc[1] == 30){
        my_message();
        }

        rtc[1] hold the minutes value.

        If you want to scroll text bigger than the display, you would need to write a new routine that used ht1632_putchar and updated the positions moving each character a pixel along. The format is

        ht1632_putchar(xpos, ypos, character);

        Hope this helps!

        Nick

  77. Hi, i have now assembly my clock and have one problem, it dosen´t work, when i connect the usb cable to the board the power lamp goes on and one of the display is lit say clock but its missing some dots in the text, when i dissconnect power to the displays the orange lamp on arduino bord flashes every seconds so i beleve the clock function works but not the displays ?
    What can i have done wrong?
    regards

    • Hey,

      Hmm, sounds like you might have something shorting out or wired wrong. The flashing every second sounds like the clock chip is OK like you say.

      Try with just one display – you should get half the display working as normal.

      Make sure the displays are set to CS1 and CS2 with the switches.

      Nick

    • now i have fix the problem,it was power problem but now when i try to set the clock it wont save it, it just says 00:00 what did i do wrong?

      • If it forgets when you turn the power off, it sounds like the battery is not connected right. check your connections to the DS1307 again.

        That could also be why the light doesn’t flash. It needs the clock chip working to flash.

      • Ok thanks i think its the clock chip thats broken, i shall replace it and see if it works

  78. Hello !

    I can not compile the program: (
    Shows such errors:

    pongclock_v2_27.cpp:18:57: error: WProgram.h: No such file or directory
    In file included from pongclock_v2_27.cpp:20:
    D:\arduino\libraries\Wire/DS1307.h:12:24: error: WConstants.h: No such file or directory
    In file included from pongclock_v2_27.cpp:20:
    D:\arduino\libraries\Wire/DS1307.h:51: error: ‘boolean’ has not been declared
    D:\arduino\libraries\Wire/DS1307.h:52: error: ‘boolean’ has not been declared
    D:\arduino\libraries\Wire/DS1307.h:53: error: ‘boolean’ has not been declared
    D:\arduino\libraries\Wire/DS1307.h:57: error: ‘byte’ has not been declared
    D:\arduino\libraries\Wire/DS1307.h:58: error: ‘byte’ has not been declared
    D:\arduino\libraries\Wire/DS1307.h:59: error: ‘byte’ does not name a type
    D:\arduino\libraries\Wire/DS1307.h:60: error: ‘byte’ has not been declared
    D:\arduino\libraries\Wire/DS1307.h:63: error: ‘byte’ does not name a type
    In file included from pongclock_v2_27.cpp:21:
    D:\arduino\libraries\Wire/Button.h:34: error: ‘LOW’ was not declared in this scope

  79. I installed the 0023 version. Now there are errors:

    pongclock_v2_27.cpp.o: In function `__static_initialization_and_destruction_0′:
    d:/pongclock_v2_27.cpp:72: undefined reference to `Button::Button(unsigned char, unsigned char)’
    d:/pongclock_v2_27.cpp:73: undefined reference to `Button::Button(unsigned char, unsigned char)’
    pongclock_v2_27.cpp.o: In function `set_value_dow(unsigned char)’:
    d:/pongclock_v2_27.cpp:1658: undefined reference to `Button::isPressed()’
    d:/pongclock_v2_27.cpp:1657: undefined reference to `Button::uniquePress()’
    pongclock_v2_27.cpp.o: In function `set_value(unsigned char, unsigned char, unsigned char, unsigned char)’:
    d:/pongclock_v2_27.cpp:1618: undefined reference to `Button::isPressed()’
    d:/pongclock_v2_27.cpp:1616: undefined reference to `Button::uniquePress()’
    pongclock_v2_27.cpp.o: In function `switch_mode()’:
    d:/pongclock_v2_27.cpp:1501: undefined reference to `Button::uniquePress()’
    pongclock_v2_27.cpp.o: In function `display_date()’:
    d:/pongclock_v2_27.cpp:600: undefined reference to `Button::uniquePress()’
    d:/pongclock_v2_27.cpp:600: undefined reference to `Button::uniquePress()’
    d:/pongclock_v2_27.cpp:679: undefined reference to `Button::uniquePress()’
    pongclock_v2_27.cpp.o:d:/pongclock_v2_27.cpp:679: more undefined references to `Button::uniquePress()’ follow

      • Hmm. Sounds like maybe there is something up with your install, or you have accidentally typed something in the code.

        I’d be tempted to remove the arduino IDE (1.0 and 0023), then the libraries folder as this can hold libraries for 0023 and 1.0 and can get confused. THen try re downloading the code from google.

        Hard to say without looking at it :(

  80. What a great looking project. I have ordered the display’s and wired it up and I can get the left part of the display working on both halves of the display by changing the switches but can’t get the whole display to work. I did see it operate once but the R an L was switched around. I turned it OFF then ON again and since I have just had a one sided display. I am thinking maybe a reset pulse but thought maybe you have saw this before.

    • Hey, glad you like it – really cool you bought the bits. If the displays only work as left, sounds like one of the CS lines maybe isn’t working.

      Check all your connections and make sure there are no loose wires / dry solder joints etc.

      You should have one display with only CS1 on and the other with only CS2 on.

      If they are the wrong way round, just change the switches round. I.e make the one that had CS1 on have CS2 on, and vice versa.

      Cheers
      Nick

  81. Problem solved. I was running the project on a dual voltage output supply. I switched the displays and arduino stand-alone board to one supply and it works great. Must have been a difference in supply grounds or the project not resetting correctly.

  82. Nick, this is entirely awesome – and that is not a word I overuse! I have my first Arduino board on order and am planning to make one of these as my first project. I’m tempted to try the 32×16 Bi-colour display from Sure, here:

    http://www.ebay.co.uk/itm/3216-32X16-Red-Green-3mm-Bicolor-LED-Dot-Matrix-Display-Infor-Board-HT1632C-/350549559210?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item519e61c7aa#ht_4795wt_960

    This is also based on the HT1632C – so should it be relatively doable to adapt the code to the slightly smaller display? Or am I missing something? MTIA :)

    • Hey Matthew,

      Yeah unfortunately it would be quite a lot of work to adapt the code – e.g.

      – rewrite the driver code to address 1 display not two, and to write in the correct format for that bi-colour display
      – rewrite the clock modes to support the reduced 32 pixel width (the 2 displays I use give 48 pixels)
      – redesign the fonts to fit 32 width – i don’t think the big numbers will fit.
      – add in any customisations you wanted to make it bi colour.

      It’s di-able (apart from word mode which might not fit on 32 pixels) but quite a big re write.

      Cheers
      Nick

      • Nick, many thanks for the reply. I haven’t got my arduino board yet, but I downloaded and looked through your code – although I’m new to the hardware side of things, I’m a developer by day. Looks very good, commented and easy to follow – so I think doing it with a different display is doable too! Adapting it is probably a good way to learn some stuff about the Arduino too. In the unlikely event my end result is presentable, I’ll send it back to you ;)

      • Hey sounds great, you can correct all my dodgy coding! Be cool to see what you come up with.

  83. Hi again Nick,

    Loving my clock, it really is a nice looking bit of furnature and a good talking point. I am finding writing useful code for it a massive challenge though. I have gone from being an Arduino noob to building your clock and have missed a load of steps learning wise ;) Any pointers on where to begin with these panels? I’ve found a few threads and posts by westfw which might be helpful but any pointers welcome

    • Yeah the problem with the panels is you need to be a bit of a brainbox like WestFW. He looked at the schematics from Sure and worked out what needed to be set to get them going. You can have a look as a start and see what codes the driver chip accepts – various modes etc etc.

      Then I just ended up playing around to learn – think of an effect you might want to do, and see how far you get!

  84. Also, I am seeing some flickering of unlit LEDs, but only ones under blocks of several LEDs (large characters other modes are fine), my wiring seems good…

    Normal?

    • Hey, looks like you have added to the code to get the numbers animating (nice!), it could be a result of redrawing the display a lot.

      I don’t see it on mine, but then I’m not drawing the screen as much, or with big block of pixels so much.

      Tricky one. If you look in the arduin forums there is an alternative method to drive the display (a post I think by WestFW) that may be better… I’ve not tried it myself though.

      • It looks like interference or my shoddy soldering :( I uploaded your sketch and it is still visible (under the Pong paddles for example). Then I fired up your sketch with my Uno on breadboard and it is not visible

        Oh well, back to the drawing board!

  85. Been working on dimming the clock (the highest intensity is far too bright for night time :D) with help from the Arduino forums. I’ve got two levels sorted (15 and 0) and been able to switch between them on button presses by cannibalizing code. Still working on getting the dimming function to trigger after a certain time though. Would you have any pointers?

  86. Awesome, thank you Kevin. I had a quick look at his code, it uses a pretty different method to what I’ve started doing… As tempting as it would be to copy him I am going to figure out what I need to do on my own! :)

  87. Hi, I saw this project and I wanted to have one! Just ordered the parts in China via american and british ebay, have them delivered to Germany within 4 weeks, and built the thing. Great! Everything works fine, but…
    When I looked inside the code, I found at least two recursions, which are a NoGo in embedded programming:
    Function normal_clock() calls itself in line 487, function pong() calls itself in line 797.
    I have not analyzed further, but maybe you will get a stack-overflow when you press the button continously.
    void normal_clock(){ …
    if(buttonB.uniquePress()){

    normal_clock();
    return;
    }
    Do I see this correct? Or is there something special in C for Arduino, which I did not understand?

    • Hey, glad you bought the bits. I’ve not had a look at the code in a long while but it could well be doing things that aren’t recommended. (I’m still quite new to programming on the Arduino.)

      Feel free to amend and glaring errors and let me know. I can post the update on the google code page.

      Nick

  88. Hi Nick,

    Still haven’t finished my clock and it’s been MONTHS lol. Have been adding to the code bit by bit though and have learned a lot. Thank you for the push I needed to get into Arduino :) Here is a short clip of my clock. Maybe I’ll finish it before the RTC battery runs out?!

    Here it was gone 1 am so it was in dimmed mode and the RGB back light LEDs are on

  89. I fired it up just to test it all without the switches. I thought it might work without them I just wouldn’t be able to set them. I fired it up and got clock v 2.27 and then it went blank. Any ideas on where it went wrong?

  90. Also I don’t have the battery rigged up. I am running it straight to the wall cause I was thinking you didn’t need it if you had a continuous source. I also didn’t use any of the resistors that came with the kit because you didn’t show them in your schematic. I did use the 8 pin chip and have it all plugged into a board just using wires – no solder.

    • Should be fine without the switches, not sure about without the battery, that could well be the problem as after the startup screen it looks to the clock chip to get the time. Another hint will be if the led on pin 13 of the arduino flashes once a second. If not the clock isn’t ticking.

      Not sure about resistors, I don’t know which kit they came with – if it was with the arduino shield they are usually for power LEDs. If that’s the case it shouldn’t make a difference if you use them or not.

      Cheers
      Nick

  91. Hi Patrick,
    I’ve used the same RTC and it works fine once all the components are connected up. The clock will work without the switches for test purposes.

  92. Awesome! I got it working. I soldered up the chip and got everything wired up. I set the time through the computer so I didn’t really need switches to change anything. I’m buying parts for the cubes now about to start on the led cube 8x8x8. Have y’all seen prices on the all inclusive kit. It’s stupid ridiculous expensive!

  93. Nick,
    Im new to this arduino stuff..just trying to compile the code and its not properly working. I keep getting a code error saying that the button does not name a type. Im not sure if ive correctly saved the library folders but could you give me step by step instructions on how to do that? because i tried following the ones provided and everytime i reboot arduino it seems as if it hasnt recognized the library folder.
    thanks very much,
    luke

    • Hi Luke,

      Glad you decided to have a go making the clock. What version of the Arduino software are you using? You need the older version 0023. If you can see the libraries under Sketch -> Import library after you restart the software then they are in the right place.

      Cheers
      Nick

      • I got the older one and I got everything connected and its working now. Thanks. But its really glitchy..not really sure why though..could it be the code? or is something off about the displays?

      • Hey, probably not the code as it works for myself and others. I would check all your connections, especially the 4 data lines to the displays and the power to the displays.

        Also make sure you have a powerful enough USB supply. If it can’t provide enough juice, you may get unexpected results like glitches on the display. Maybe test it with just with one display plugged in, that would reduce the power consumption.

      • Hi Nick,
        Neat clock. I have ordered all of the parts. Decided to load an verify the code, but I get tons of errors on my Macbook Pro. Yes, I am using a 1.0.x version of the.

        I decided to try it on Win7, on my fusion VM, with 023, and it does verify.

        I am curious, are you planning on updating the code for version 1.x.x anytime soon?

        I once had to roll back to 1.0.1 fro some other example. It gets real messy, I hate using more than one version, especially since there is no support form the Arduino team for anything other than most current IDE.

        I certainly do not have your programming skills.

        Has anyone else updated your work that you know of?

        Thanks for your efforts!

      • Hey Kirby, Glad you decided to make the clock. I had a quick look at updating the code a while back but I must admit I didn’t get very far. If someone was willing to go through and update it I’d be happy to add it to my google code page. I know it’s a pain working with different versions of the IDE.

        Cheers
        Nick

  94. Hi! This is perhaps the best creation in the Arduino. I would like to do the same clocks, but I have only HT1632 matrix. : ((
    I’m so confused with libraries and code programs that are here in the comments …
    Could you send me an e-mail the necessary libraries and program code for matrix HT1632… Please!

    • Hey, glad you like the clock. Sorry but I don’t have time to re write it all for the displays you have. Buy the new ones, they aren’t that expensive!

  95. I see no resistors? I’m a grade 12 working on a prject so im not good at this stuff, are the resistors built in to the led matrix, if not where are they?

      • Hey any kind of wire you get at the hobby store / radioshack will do. Like stuff used in battery powered toys or whatever. You don’t need to add any resistors.

  96. I bought a few of them a while back from an eBay seller called offtherails2000, they have since gone up to £3.99 + P&P but it looks like a better kit. I got an older ATMega328p rather than the newer 328P-PU, different LEDs and one tactile button. This guy is really helpful, we’ve swapped a dozen or so Arduino related emails over the last few months, great guy

    http://www.ebay.co.uk/itm/ATMEGA328-PU-ArduinoUNO-PRE-LOADED-KIT-Loose-Breadboard-Components-Kit-1-Kit-/221143775528?pt=UK_BOI_Electrical_Components_Supplies_ET&var&hash=item337d323928&_uhb=1

    http://www.ebay.co.uk/sch/offtherails20000/m.html?_nkw=&_armrs=1&_from=&_ipg=&_trksid=p3686

  97. Hello Nick!

    Great project, i really like to rebuild this!

    Can you by chance email or share the code for the old “non-C” Holtek HT1632 ?

    I happen to have two of these display lying around and want to use them :)

    Thank you for sharing this nice thing!

    Regards Markus

    • Hi Markus, I’ve just uploaded the driver for the older style displays to my google code page. There are a few tweaks you need to do to the code that i’ve put in the description notes.

      Cheers
      Nick

  98. I finished building today and downloaded the code.

    It uploade to the Arduino with no error messages, but nothing is showing on my board.

    I left all for code unmodified, but I am only using one board right now. Is that why nothing is showing? My second one is on the way, so if I plug in that will this work?

    Or did I do something else wrong? Should something still be showing with one board?

    • Yes you should see half the clock with just one board. Changing the dip switch will choose which half.

      Check the dip switches and check all the connections and that you have everything wired to the correct pins. Also check the clock is ticking, the arduino pin 13 LED should flash once a second.

      Also check you have the new version of the display board with the chips on the back.

  99. Hello.

    I try to uploas your program in my atmega and in arduino software i have this errors:

    pongclock_v2_27.pde:-1: error: ‘Button’ does not name a type
    pongclock_v2_27.pde:-1: error: ‘Button’ does not name a type
    pongclock_v2_27.cpp: In function ‘void gettime()’:
    pongclock_v2_27.pde:-1: error: ‘RTC’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_chipselect(byte)’:
    pongclock_v2_27.pde:-1: error: ‘DEBUGPRINT’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_chipfree(byte)’:
    pongclock_v2_27.pde:-1: error: ‘DEBUGPRINT’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_writebits(byte, byte)’:
    pongclock_v2_27.pde:-1: error: ‘DEBUGPRINT’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_sendcmd(byte, byte)’:
    pongclock_v2_27.pde:-1: error: ‘HT1632_ID_CMD’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_senddata(byte, byte, byte)’:
    pongclock_v2_27.pde:-1: error: ‘HT1632_ID_WR’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_setup()’:
    pongclock_v2_27.pde:-1: error: ‘HT1632_CMD_SYSON’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘HT1632_CMD_LEDON’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘HT1632_CMD_COMS01’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_clear()’:
    pongclock_v2_27.pde:-1: error: ‘HT1632_ID_WR’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_putchar(byte, byte, char)’:
    pongclock_v2_27.pde:-1: error: ‘myfont’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_putbigchar(byte, byte, char)’:
    pongclock_v2_27.pde:-1: error: ‘mybigfont’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘mybigfont’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void ht1632_puttinychar(byte, byte, char)’:
    pongclock_v2_27.pde:-1: error: ‘mytinyfont’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void normal_clock()’:
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void display_date()’:
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void fade_down()’:
    pongclock_v2_27.pde:-1: error: ‘HT1632_CMD_PWM’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘HT1632_CMD_PWM’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void fade_up()’:
    pongclock_v2_27.pde:-1: error: ‘HT1632_CMD_PWM’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void button_delay(int)’:
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void pong()’:
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void word_clock()’:
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void jumble()’:
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void switch_mode()’:
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘void set_time()’:
    pongclock_v2_27.pde:-1: error: ‘RTC’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘DS1307_SEC’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘DS1307_MIN’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘DS1307_HR’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘DS1307_DOW’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘DS1307_DATE’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘DS1307_MTH’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘DS1307_YR’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘byte set_value(byte, byte, byte, byte)’:
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonB’ was not declared in this scope
    pongclock_v2_27.cpp: In function ‘byte set_value_dow(byte)’:
    pongclock_v2_27.pde:-1: error: ‘buttonA’ was not declared in this scope
    pongclock_v2_27.pde:-1: error: ‘buttonB’ was not declared in this scope

    What shoul i do?
    Regards.

  100. Hi,

    I am trying to compile your code using my macbook but I get the following errors. Can you point me in the right direction? I am using Arduino 0023 as suggested in your instructions:

    pongclock_v2_27/Button.cpp.o: In function `Button::pulldown()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/Button.cpp:48: multiple definition of `Button::pulldown()’
    Button.cpp.o:Button.cpp:48: first defined here
    pongclock_v2_27/Button.cpp.o: In function `Button::wasPressed()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/Button.cpp:73: multiple definition of `Button::wasPressed()’
    Button.cpp.o:Button.cpp:73: first defined here
    pongclock_v2_27/Button.cpp.o: In function `Button::stateChanged()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/Button.cpp:84: multiple definition of `Button::stateChanged()’
    Button.cpp.o:Button.cpp:84: first defined here
    pongclock_v2_27/Button.cpp.o: In function `Button::isPressed()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/Button.cpp:55: multiple definition of `Button::isPressed()’
    Button.cpp.o:Button.cpp:55: first defined here
    pongclock_v2_27/Button.cpp.o: In function `Button::uniquePress()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/Button.cpp:91: multiple definition of `Button::uniquePress()’
    Button.cpp.o:Button.cpp:91: first defined here
    pongclock_v2_27/Button.cpp.o: In function `Button::pullup()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/Button.cpp:39: multiple definition of `Button::pullup()’
    Button.cpp.o:Button.cpp:39: first defined here
    pongclock_v2_27/Button.cpp.o: In function `Button’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/Button.cpp:28: multiple definition of `Button::Button(unsigned char, unsigned char)’
    Button.cpp.o:Button.cpp:28: first defined here
    pongclock_v2_27/Button.cpp.o: In function `Button’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/Button.cpp:28: multiple definition of `Button::Button(unsigned char, unsigned char)’
    Button.cpp.o:Button.cpp:28: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::set_sram_byte(unsigned char, int)’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:209: multiple definition of `DS1307::set_sram_byte(unsigned char, int)’
    DS1307.cpp.o:DS1307.cpp:209: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::set_sram_data(unsigned char*)’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:186: multiple definition of `DS1307::set_sram_data(unsigned char*)’
    DS1307.cpp.o:DS1307.cpp:186: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::save_rtc()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:42: multiple definition of `DS1307::save_rtc()’
    DS1307.cpp.o:DS1307.cpp:42: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::start()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:164: multiple definition of `DS1307::start()’
    DS1307.cpp.o:DS1307.cpp:164: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::stop()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:156: multiple definition of `DS1307::stop()’
    DS1307.cpp.o:DS1307.cpp:156: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::set(int, int)’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:95: multiple definition of `DS1307::set(int, int)’
    DS1307.cpp.o:DS1307.cpp:95: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::get_sram_byte(int)’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:199: multiple definition of `DS1307::get_sram_byte(int)’
    DS1307.cpp.o:DS1307.cpp:199: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::get_sram_data(unsigned char*)’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:172: multiple definition of `DS1307::get_sram_data(unsigned char*)’
    DS1307.cpp.o:DS1307.cpp:172: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::read_rtc()’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:24: multiple definition of `DS1307::read_rtc()’
    DS1307.cpp.o:DS1307.cpp:24: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::get(int, unsigned char)’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:64: multiple definition of `DS1307::get(int, unsigned char)’
    DS1307.cpp.o:DS1307.cpp:64: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::min_of_day(unsigned char)’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:148: multiple definition of `DS1307::min_of_day(unsigned char)’
    DS1307.cpp.o:DS1307.cpp:148: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307::get(int*, unsigned char)’:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:55: multiple definition of `DS1307::get(int*, unsigned char)’
    DS1307.cpp.o:DS1307.cpp:55: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307′:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:15: multiple definition of `DS1307::DS1307()’
    DS1307.cpp.o:DS1307.cpp:15: first defined here
    pongclock_v2_27/DS1307.cpp.o: In function `DS1307′:
    /Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:15: multiple definition of `DS1307::DS1307()’
    DS1307.cpp.o:DS1307.cpp:15: first defined here
    pongclock_v2_27/DS1307.cpp.o:/Users/user/Documents/Arduino/libraries/pongclock_v2_27/DS1307.cpp:209: multiple definition of `RTC’
    DS1307.cpp.o:DS1307.cpp:209: first defined here

  101. Hi,

    when I try to verify the coe, I receive this error:

    ‘myfont’ was not declared in this scope.

    How can I resolve this?

    Thanks, Andrea from Italy

    • Sounds like you don’t have the libraries in the right place. Make sure they appear in the menu like the instructions say.

    • Hey, looks great – love the case! Not sure why your RTC doesn’t set the year, it looks the same chip. Does it remember the time when it’s turned off?

      You can always cheat and set the year in the software code!

  102. Hi Nick,

    Finally got all my parts, and got the clock running. Had a bit of trounle becuase I followed your illustration for wiring the DS1307, even though I really do know how to count pins on a DIP!

    Clock still seems to work, though I did put a new on in to see if the Day and Year setting problem I am having went away. It did not. The clock says it is tuesday, even though it is Saturday! And when I go to try to set the time again, it says Tuesday, and the year is always 2010!

    I am perplexed by this. Sometimes the day name is correct when it goes through that cursor mode thing, but mostly it is wrong. I am curious to see what it does later in the week.

    Times seems ok, though I really wish there was a twelve hour number mode.

    Still really fun, but I would love to know why this anomaly is happening. Interesting to see that another fellow is having the 2010 year problem that I am.

    I assume that you are really supposed to see the current day and day name when you are in time setting mode?

    Best wishes.

    Kirby

    • Hi.

      I get the same problem.
      If i set 2013 in the year, the days (monday, tuesday…) displayed are wrong.
      So i set 2010 for the year, and the clock work fine.

      • Hey,

        Try setting the day individually, Its not clever enough to work it out from the date if I remember right.

        Nick

    • Hey, not near the clock/code so I can’t check, but i think the clock will load up the time set in the main sketch when it goes onto set mode. It it will always be 2010 or whatever. You can change this in the code.

      If I remember right, you need up set the day name too as you go through those set screens, it’s not clever enough yet to figure the day out from the date yet.

      Cheers

      Nick

      • Ahhhh, you know, that makes a great deal of sense.

        I got it set now, so it is near perfect. I think I was skipping through the day and year, trying to reset the seconds to get it close as possible. I am pretty sure I set every item the last time, and that is making sense with what you have said. The dayname and year does always seem to be as you said now that I think about it. Tuesday 2010!!

        The kit work marvelously now, thanks so much for sharing your work with all of us!

        I wish I understood the programming better, so that I could help you update it for the newer Arduino IDE versions.

        I would also love to add a few modes, I love to see seconds incrementing. Kind of like the Doomsday clock I see at Wiseduino, and Wyolum’s YouTube video.

        I am running the version that another user listed here, with the animated digits, and blinking colon. I am too slow witted to use the binary clocks! I can’t add it fast enough.

        Now I just need to fab a case.

        Thanks again! Really really cool kit!

  103. I’m having two problems which I believe to be related. The button folder will not unzip without errors and then I get errors when I compile about button nor being defined.

    • The Button folder should not need to be unzipped separately, if you unzip the main file you download then all the libraries will be ready, just drop them into the correct folder as per the instructions.

      • OK, I used win rar to unzip into the libraries folder but I still get an error message when I compile.

      • Hmm, what exactly is the error you are getting from winrar? maybe your download is corrupted somehow? Try re downloading it. Then all you should need to do is unzip that single file to see the 4 folders and code file.

  104. Hi Nick,

    I absolutely love what you have done/are doing here. I’m a web developer with a good knowledge of C# (always have been into electronics). I stumbled across your project and instantly said “Ive got myself a new hobby!”. I never heard of Arduino until i saw this post. ive been aware of electronic dev kits through college mates but didn’t think they would be capable of doing anything more than powering a buzzer connected to two LEDs. Or i have seen motion sensor robots etc.

    ANYWAY:
    I’m leaving this post to show my appreciation for what you have done and to say i have ordered all of the components except the RTC. I was looking at this and wondering if it would work and if so which connector is the 5v? I know the Arduino analog pin 4 connects to SDA & the Arduino analog pin 5 connects to SCL.

    http://www.ebay.ie/itm/New-I2C-RTC-DS1307-AT24C32-Real-Time-Clock-Module-For-Arduino-AVR-ARM-PIC-SMD-/261121346932?pt=LH_DefaultDomain_0&hash=item3ccc0b8d74

    It will probably be a month or so by the time i get all the parts and all running. Ill hopefully post a video once things are running.

  105. Sorry, after a bit if goggling i found out that the 5v is the VCC. However my question still remains if this will work? i see it has two sides to it with P1 & P2 sets of connections. Also the fact that it comes added with an eeprom, resistors & diodes which i don’t quite understand their presence.

    I’m sorry but my expertise isn’t in the hardware department, i just know enough to get me by :).

    • Hey James. thanks for the post, really glad you’ve been inspired to get into this stuff!

      Yes Vcc is the 5v like you say. As for that particular RTC module, I can’t say for certain, but it looks like it should work. There’s no circuit diagram, but I’m guessing the RTC connects to one side of connectors, and the EEprom to the other (not sure which is which). My RTC also came with an EEprom so they are often sold together by the looks of things.

      I guess you’re gambling $2 here… so maybe not the end of the world if it doesn’t pan out! Let me know how you get on.

      Cheers
      Nick

      • Yea if it doesn’t work attached to the board i can always separate the individual parts.

        I wonder if you could help me with another similar project. I have removed a 7×80 color LED matrix from a text scroller. I think there was something wrong with the board attached to it, it was used to show film times above a cinema screen.

        My question is: on the matrix it has a set of 10 2pin connectors in a row. It looks like your 16 pin IDC only without the plastic surround and with 20 pins. Is there any way to know or find out which pins are which. Like i said before im not a hardware person. But i would like to connect an Arduino to it and revive it as a text scroller, or maybe another clock. I know this is off topic from your clock but i would greatly appreciate your help as i cant seem to seem to find an answer online.

        Thank you,

        James

      • No fraid not. It’s impossible to say unless you can find a wiring diagram or identify the ICs and trace the pins.

        Nick

  106. Hey, Nick.
    I built the clock, and I’m having trouble getting the clock set.
    Once I set the time, the cursor flashes on screen for a few seconds, and then ”
    0TH
    Y

    Is displayed and fades after a few seconds.
    And advice?…
    Thanks.

    • Hey Alex,

      Weird one, does the time change if you leave the clock alone? If not I’d say it’s not reading the time from the clock chip, so check the connections to that.

      Nick

      • Hey, I was able to figure out what the problem was. I wired it up exactly as it’s pictured in the schematic and didn’t read what you have right under the picture. Oops.

  107. Hmmmm….. sounds very familiar!
    Did the exact same thing myself a few weeks ago when I built mine!
    The RS1307 got pretty hot….. but it still worked after I corrected that problem.
    And as I mentioned earlier… I should have known better, I know how to count pins on DIP’s!!

  108. Woo Woo! After a month of waiting on the parts they all finally arrived (With the setback of customs holding and charging me €13 for the LED matrix, Sure Electronics declared them as bottles!). I had all built in a couple of hours and it worked first time, All down to your great instructions. Thanks again Nick! Have you tried powering the clock from a battery pack and if so how long did it last?(would the 9V provided from the battery constitute as too much power as per your warning?)

    • Hey, great news! Glad you made it! Annoying about the LED panels though.

      A 9v battery (rectangle one) Wont give enough power to run all those LEDs. You’d need a chunky battery to run it for any length of time – maybe a bunch of D cells with something to bring the voltage to 5v?

      Nick

  109. I’ve read your tutorial…great. You explained this really well. I’m waiting for the LED matrix and i want to put two pot to play pong! I’ll let you know ;)

    Congratulation for your work.

    Valerio

  110. Hello,
    Thank you for this project.
    I have built one, using the 5mm displays. It seems to be working fine, however I am not getting any clock signal (time stays 00:00) I am using Grove RTC from seeed as I couldn’t get my hand on a DS1307 by itself.

    Do you think my problem is because I am using Grove RTC? If yes, can I tweak the code to get it working?

    The sample code project on Grove RTC doc seems to function correctly (I can see the correct time on the serial)

    Thanks again for the project and for your time.

    • Glad you built one. That grove RTC should be fine, it just looks like a DS1307 packaged on a circuit board. Just check you have it wired up correctly, the doc I found mentions something about a base shield that plugs into the Arduino. The arduino pin 13 LED should flash once a second when it’s connected right.

      Nick

      • Hello again,
        I managed to get it to work, however there are some weird behaviors, here is how i got it to work:

        1- I got an actual DS1307 and the behavior was the same as with the grove RTC.

        2- The led on Arduino is always on (not flashing), however when i added a 220ohm resistor and a led on pin 13, it started flashing.

        3- The set clock function in the code never works, to get it working, I had to set the time first using a code sample i found online for the DS1307, I was able to confirm this because the sample code uses the same pins as the pong clock to communicate with the DS1307 so i am sure it’s not a connection error.

        When i set the clock with sample code, pong works perfectly, if i disconnect power and battery, pong shows 00:00 forever, setting the time does not work.

        4- Since, the code sample I have does not set the day of the week, the clock thinks it’s always Tuesday and never updates that even when a day passes.

        5- All other clock modes(apart form Pong) do not work properly:
        5.a- Words mode: always shows Twelve o clock for 1 sec, then the real time for 1 sec and so on.

        5.b- Jumble mode: keeps randomizing every second, using debug, the variable mins was not correct, either empty or has the wrong minute, so I changed the for loop to be “rtc[0] == 59” instead of “mins != rtc[1]”, which seems to have fixed the problem, however the day of week was still garbage since it was not set, so i replaced the array with months, it works fine this way, however as soon as you go back to another mode, you find that the time has been stuck in the past and did not update, the only way to get it back to work is to set the time again using sample code.

        5.c- Normal mode: Displays the correct time for 1 sec then displays 00:00 forever

        5.d- Random mode: Seems to be okay, it’s just that most other modes do not work.

        5.e- Pong mode: Works perfect, I left it overnight and the time was right, disconnect/reconnect power and time was still good.

        5.f- Set clock: Only saves time, not the date/day.

        5.g- Display date: Sometimes shows: ET HOUR 0TH. and sometimes shows the correct date.

        Since I do not know very well Arduino nor C++ I cannot tell what/where is it going wrong, but while debugging, I can see that the rtc[] array in pong mode returns the time correctly, while in all other mode there is a parameter or two incorrect.

        Have you seen anything like that before?

        Thank you again for the project and for your support; And please excuse my very long post.

        Achraf

      • Hey,

        This is all very strange, I’ve never seen this behaviour. Everything should just work, you shouldn’t have to start changing odd things in the code per mode. If the time data is correct they should all be fine.

        It sounds like you have a bigger issue, maybe an unstable power supply? Does it work without the displays plugged in and some debug lines, or with just one plugged in? Try and reduce the power draw. Are you powering via USB?

        Do you another Arduino to test it with?

        Nick

      • As per your advise, I tried to disconnect the second display, it seems to have worked, all modes work better now, except numbers mode, which now blinks the real time and 00:00 every second.

        My arduino is powered by USB (from PC when debugging and from a 2A USB adapter when not)

        My multimeter reads 470 to 480mA when both displays are connected and 500mA when only one is connected.

        I unfortunately have no other Arduino to test with.

        Regards,
        Achraf

      • Solved. Simply switching to a DC adapter fixed all the problems! I don’t really understand why, I have to admit, it’s my first arduino project and I am a bit confused by this behavior.

        Again, thank you for the great project and for your support.

        Achraf

      • Ah well done. It sounded like it might have been something funny with the power. Really glad it’s working!

  111. Hi, i build thi clock för about a year ago, now i have a problem, the clock hangs up and freeze the display, i have to disconect power to reset it. Why is this comming after a year ? And is there any sollution for it ?
    //Axel
    (sorry for my bad english)

  112. Thanks Nick for a fantastic project, I would like to see the 2 Binary modes from 2.28 incorporated into 4.02 !! I have had a play with the code but I’m not clever enough to know what I’m doing !! Anyone like to help me out ?

    • There’s a guy who has done some work on it on Instructables – he might be able to help. I don’t have time to code it all these days.

      Nick

  113. Hi again Nick,
    Anxious to load your new update!

    12 hour mode is a great addition.

    I am currently running the modified version that has the two binary clocks, and animated digits. I hope that programmer will incorporate your changes. ( I did find a repeatable bug in that version hard to explain ).

    I have built two clocks now. One green with a shield on a Diavolino, and now a red one with no shield at all. While I was building my own single board proto board, which was getting a bit messy as far as the wires, I found a great product that I wanted to share with everyone.

    http://www.spikenzielabs.com/SpikenzieLabs/Prototino.html

    I am using this “kit” for my second clock, and it is working well.

    I have soldered a female 16 pin IDE conector on to the board, and I am plugging the whole board directly on to the LED matrix, eliminating one cable. Connector placement is critical, for the board to fit. If I knew how, I would design a complete board to do all of this. I know I saw some person’s project that did that very thing, but can’t find it now.

    This is a bit tricky I must admit. Had to cut a few traces carefully, and remove a few pins on the connector. The nice thing is that it cuts down on the number of jumper wires. There are some power considerations, but I hope others can work that out if they decide to try this neat Arduino clone.

    Thanks again for your work and generosity on this clock!

    Kirby

    • Hey that is a great idea having the connector directly on the board with the Arduino, saves a ribbon cable and makes it more compact. Send me a picture when you’re done!

      Someone was actually meant to be designing a dedicated PCB for it actually, but I’ve not heard anything back as yet.

      Nick

  114. Hi Nick,

    Can’t wait to have a dig about your code to see how you achieved dimming. It took me a month of head banging and still isn’t quite bug free! Sometimes my clock bathes my room in glorious green LED light at 3am :p

    • Hey, the dimming mode was actually added by a chap over at Instructables, so I can’t claim the credit there!

  115. Whadda’ ’bout the12hr mode?
    That’s my fave ill’ improvement/feature?
    Hate military time!

    Cheers!

  116. Hey!!
    I recently built a pong clock of my own and wired it up all right (So I think) and it seems to work but I cant set the time!!! Every time I try it always reads 00:00 or 12:00 depending if I have it on a 12 hour or 24 hour time, anyone have any ideas of what is going on?? I thought my RTC chip was broken or something so I used another one but still, the same problem. Its been happening for a few weeks now and I have no clue what to do so can anyone help me????

    • Are you absolutely sure that you have wired the RTC chip correctly? If the time is not changing at all, something is definitely wrong.
      I wired it first time so that it physically matched the drawing, but Nick pointed out clearly in the docs that the pin-outs on the chip in his drawing are not as they really are on the chip!
      The numbering goes counter clockwise from the top left most pin when you have the dimple or other pin one marking on the top. So 1 & 8 are opposite each other as are 2 & 7 etc.
      I was truly embarrassed, because I know how chips are numbered, but I blindly followed the drawing. Once I realized that, and corrected the wiring, all has been well, and now I have built two! One red, and one green, kinda’ like New Mexico Chiles.

      • Hey Kirby,
        I wanna thank you so much for replying!! Ive been having this problem since the start of the summer and I could not be able to understand why! I know that 1 and 8 are opposite each other and I am 99% positive I wired it up correctly. My chip looks exactly like the on in the photo except for the big circle in the bottom left corner. And I presume the leg next to the circle is leg number 1 which is left of the semi-circle on top and thats exactly how I wired it up. Also since Im kind of new at this I tried wiring it up all different kinds of ways, none of which worked. Do you have to somehow program your RTC before it works?? Any help would be appreciated!!!
        -David

  117. I’ve tried everything you’ve said and read other posts as well. but its not working. Could you please do a video tutorial on this. And also a way to test if the led matrix is working.

  118. Nick

    Just wanted to thank you for the clear explanations to build a great project! I love my pong clock and have learnt a lot making it.

    Matt

  119. Nick,

    Thank you for a great site and tutorial.

    I have a weird problem. I was using TIny RTC as a replacement for DS1307 and clock was working fine. Than something happened (no idea what) but time no longer will save nor Arduino can retrieve time from the RTC. I thought since in your specs you specifically said to use DS1307 I ordered that and got it all setup on the breadboard. I can see that if I had wiring or some issues sketch wont work so I know that all my wires are connected correctly and clock is showing up on the display, the issue is same as with Tiny RTC , time wont come (get_time()) and nothing gets stored on DS1307. Clock always show 00:00 and Tuesday Jan 1 2000.

    I have also taken out all wiring , kept only the clock circuit and loaded TestRTC sketch. I can set the time and date and retrieve it too. It confirms that I can get time from the chip but the pong clock sketch is unable to retrieve. The amazing thing is that every thing worked for three or four days and than it all stopped.

    Regards

    Naveed

    • Oh just to update, I did google on the pin configuration and got it working correctly. One of the way of knowing is that when you have wiring wrong on the chip you only get the pong clock version 4.0 and nothing moves further. Once you fix your wiring on the chip every thing works except time is not correct.

      • Hey, the tinyRTC module looks to have a 1307, so should be the same as a separate 1307 chip.

        Weird it works on the test script. Could it be a power thing? Maybe try another PSU.

        Or could you stick the testRTC script as a new function in the pong sketch, and use that for gettime() as a test.

        You can also add print statement to the clock code to print rtc[0] (secs) rtc[1] (mins) etc to see if those values change.

  120. Hi Nick, great project.

    I am having problems getting the components for this to work!

    I have purchased so much from Sure Electronics over the years, amplifiers and all sorts… It seems they no longer sell the displays… “2 x Model 2416 LED Matrix Displays from Sure Electronics.” I do know they used to sell them so its of more frustration!

    Do you or anyone know where:
    1) I could get the 2416 modules; or
    2) Any similar setup that can be achieved from the led matrix modules that are real cheap, with some controller IC or components to achieve something very similar?

    I tried ebay, amazon, alibaba/aliexpress and even Googled… but to no avail.

    Any help much appreciated! :)

  121. Another report of a successful clock build. I used the Tiny RTC which are available on ebay. The Tiny RTC contains a DS1307 chip. The pin-out is as follows

    SCL=Pin 6=Arduino A5
    SDA=Pin 5=Arduino A4
    VCC=5V
    GND-GND

    The Tiny RTC also contains a temperature sensor which I would like to add temperature to the Pong Clock. Has anyone done this?

    It would also be nice to set the time with the atomic clock radio signal or using a GPS receiver

    • Hey great news Jim. Post a pic if you can!

      Temperature would be a good addition. You might be able to use some raw I2C commands to grab the temperature direct from the board without having to ditch the RTClib library I use. Maybe ask in the Arduino forums as I couldn’t see anything with a quick google. You’d want to stick the commands in the get_time() function. Then I guess you could tack another screen on the display_date() function to print the temp, or maybe another menu option for it.

      Alternatively if you can’t use raw i2c, looking here:
      http://www.freetronics.com/pages/rtc-real-time-clock-module-quickstart-guide

      They provide a library to read from a board which looks similar to yours:

      #include

      So you could adapt the pong code to use that library to get time and temp instead of RTClib – specifically these functions:

      get_time() – reads the time from the RTC
      set_time() – set the time on the RTC
      set_dst() – adjust the daylight saving option by setting the RTC
      setup() – you’d need to add whatever is needed for the new library
      plus change the ds1307 object at the top of the code.

      The new library looks pretty similar to what I used – ie. you create an object and use it to set / read the time – so it shouldn’t be too tricky.

  122. Hi Nick, I see you are looking to get a PCB designed ? I would give it a go, however I feel you would be better to design a PCB shield for the UNO. If you want a complete PCB so you can do away with the Uno, you will need to replicate what Arduino have done so fantasticlly and people would need to have the Atmel with the boot loader already burnt, and you would still need to provide a way of uploading the code. Let me know if you want me to have a crack at it.

    • Hey Gary,

      Thanks for the kind offer of giving this a go. I thought about making a shield to start with, but then I realised a lot of the stuff on the Arduino / Uno isn’t needed for the clock, plus one PCB would be smaller and more compact. Ideally with an IDE socket on it so it connects straight to the display (i.e. no ribbon cable).

      The ATmega doesn’t need much at all to support it – just one resisitor, 2 capacitors and a crystal. See: http://arduino.cc/en/Tutorial/ArduinoToBreadboard

      You can buy pre programmed ATmega chips from Ebay and I was thinking of having a header for an FTDI cable for people to program them with.

  123. Hi Nick,

    O.k I will give it a go, I forgot to ask if you still want the Pong clock to be powered by USB cable ?

    Give me a few weeks and I should have something ready.

    • Hey, great you’re having a crack at it!

      Good point on the USB. How about we
      just go with a 5v ‘wall wart’ and round jack. Might be cheaper.

      • I was also thinking of keeping it a single sided PCB, cheaper and easier to be made at home, but has some limitations i.e may need jumper wires, I will have a play around and see what works best.

        I was also going to include a reset switch, or at least a place to put a reset with if required.

      • Hey, good point on the single sided idea. I’ve never made a PCB so didn’t consider that idea. A reset switch would be good, maybe even a spot for the led on pin 13 that flashes seconds.

  124. Hi Nick,
    It’s been a while since I left you a comment here. Great to see so many pong clocks being built!

    I managed to blow my first set of panels with some dodgy soldering. I kept meaning to get another set sent over from China, but never quite got around to it. Then I found a 16×32 RGB matrix ( https://www.adafruit.com/products/420 ) that was easy to get hold of in the UK (http://www.phenoptix.com have them) , and re-wrote your code to work with it.

    I added a microphone, and gave it a spectrum analyser mode:

    and then added an ethernet shield to go pick up the weather forecast

    So, many thanks again for such a great project. It’s kept me busy for many hours. Everybody loves the clock when they see it.

    Cheers,
    Andy

    • Hey Andy, that looks awesome, you’ve really gone to town with it! Love the colours. I must admit I have a 32×32 one of those matrices currently languishing in a drawer as part of a half completed project. I was trying to hook it up to a raspberry Pi but I couldn’t get the bit rate fast enough. I should revisit it sometime.

      Glad you got inspired though!

      Nick

    • Hi Andy,

      That’s a very cool mod you have going there!

      Do you by any chance plan on sharing the code and wiring with the world?

      Just curious. Always looking for another LED project.

      I am really enjoying Nick’s latest version, with the seconds, and rolling digits, not to mention 12 hr mode!

      Cheers!

      Kirby

    • Hi Andy, I would appreciate your help. I ended up with the same RGB display like the one you’re using. This fact, lead me in trouble, as Nick is using a monochrome version.
      I don’t have the ability to change the code, or re-wire the timer.
      I am trying to use an Uno, but also have a MEGA2560, if more convenient.

      So far, I have managed to hook up panel with UNO, and run a demo code, following Sparkfun’s tutorial.
      Now, I ‘m stuck, trying to follow Nick’s instructions. There is a conflict in wiring setup. The ds 1307 push switches are supposed to be connected to dig2 and 3 pins on uno, but these pins are already hooked up on the display.

      Probably you already have worked your way around this problem.
      You ‘re mentioning this is the easy part..! on another post.
      Please bare with my ignorance :-\

      I really want to finish this project (my first one actually).
      Any advice/help regarding code, setup will be more than appreciated.

      Peter

      • Peter

        I’ve used an UNO and 2560, no problem… just watch the wiring…

        Re the pushbuttons, they go to Digital 2&3, the Display goes to 4,5,10 & 11…

        No conflict!?

        Hope that helps

      • Anthony, thank you very much for your reply.
        Maybe, I wasn’t very clear, excuse me.
        I have the 16×32 RGB version display.

        please check
        https://learn.adafruit.com/32×16-32×32-rgb-led-matrix/connecting-with-jumper-wires
        or
        https://learn.sparkfun.com/tutorials/rgb-panel-hookup-guide

        these are the tutorials I followed, to test the display, and it works.
        I run into problems, when I try to follow Nick’s instructions.
        Andy has worked this out (with RGB) but unfortunately no wiring guide is provided.
        Maybe this is easy, but I am tragically fresh in mcontrollers, I need help.

        Any advice welcomed.

        Peter

      • Hi Pete,
        I put my RGB version of Nick’s code here:
        https://github.com/twonk/RGBPongClock
        I think you’ll probably need to go with the MEGA as the UNO will be short on memory.
        Wiring info can be found here (you’re not the first to ask).
        https://github.com/twonk/RGBPongClock/issues/3

        An alternative to using Arduino is to use a Particle Photon. Someone else has taken the RGB code, and got it working on the Photon, and they’ve even created an add-on board that plugs directly into the panel. More details can be found here:
        https://community.particle.io/t/maker-faire-rgbpongclock/11813
        The photon has built in wifi, and can handle the weather display thats part of the code without the need for a proxy to translate the weather feed from weather underground to a simple format.

        Good luck!
        Andy

      • Andy, thank you for your reply!
        This is what I really needed, your information is invaluable.
        I will study your instructions, and hope project will work out.
        Hope to learn a lot, on the process.

        Will get back on this discussion, as soon as I have some results.
        Thank you again
        Regards

        Peter

      • Andy, thank you for your reply!
        This is what I really needed, your information is invaluable.
        I will study your instructions, and hope project will work out.
        Hope to learn a lot, on the process.

        Will get back on this discussion, as soon as I have some results.
        Thank you again
        Regards

        Peter

  125. Hi Nick,
    Saw your project and just HAD to do it.

    Got all the parts and downloaded the most recent code to run with the Arduino 1.05 software.
    Loaded the four libraries and when I went to compile I get the following error:

    error: ‘myfont’ was not declared in this scope.

    The Font library is in libraries folder as well as the other three libraries and were imported via the Arduino program as I normally do for other libraries on other projects..So I am kind of at a loss to understand what is wrong.

    I program my Arduino with a PC and not a MAC but as far as I know that should not be a problem

    Any help would be appreciated.

    Thanks,

    Paul

      • Yes they do. That is what I found strange too.

        I have seen a couple other comments posted with the same problem. The reason I mentioned that I was using a PC and not a MAC is that the zip file for the Pongclock5 seems to be set up for a MAC.

        Thanks for responding… Paul

      • Yes I made the zip file on my mac, but I think it should be compatible with PC.

        How do you know the zip was set up for mac by the way?

      • When I unzipped the files to my computer I come up with a directory called __MACOSX as well as the 4 library file directories, Pongclock 5 directory and a Readme.TXT file. The __MACOSX is the dead give away.

      • Hah, yea that is a bit of a giveaway isn’t it! I forgot how Windows will show the Mac’s hidden files.

        Can you confirm you have the include Font.h line at the top of the code under the //include libraries comment? I get the same message if I take that out.

        Maybe also check to see that you don’t have another Font library installed that’s conflicting. As a check you could rename your current libraries folder to something like libraries_old and then create a new one just with the pong libraries in.

      • Hey Nick,

        Your trick with creating a library file with just the PongClock5 libs worked like a charm. Have to remember that one in case of similar future problems. Thanks again so much for your help. It is much appreciated. Looking forward to getting this going later today. Still woking on a few “Honey DOs”

        Paul

      • Hey, glad it worked – thanks so much for taking the time to build one! (Good luck with the chores too!)

  126. I have been working on a PCB layout, I should have something to post by the end of this week.

    Just need to get one made or for someone to have one made to confirm all works, for the present I left the pong clock powered by USB, as on my PCB there is no voltage regulator or no voltage protection, it would be far too easy to destroy the Atmega 328. I wouldn’t take much for me to change the PCB to a DC Jack, but then there is the issue of polarity.

    • Hey Gary, that’s great news. You might want to talk to Kirby on here as he was also having a go at a PCB and trying out voltage regulators. Can’t wait to see what you come up with.

      • Hi Nick I have a finished (revision 1) of the PCB, it has not been tested or made yet. what would be the best way of posting the pdf files ?

  127. Hey Nick,

    After your help getting it working and putting it together, I noticed a few things in the pong display and was wondering if you or anybody else has made these observations.

    1. The left paddle will occasionally miss the ball when it is not the minute mark, another ball appears and then the left paddle will miss again in a few seconds and the minute score will update,

    2. The right paddle will occasionally miss when it is not on the hour and another ball will appear and the game will continue with no change in “score”. When it is the hour mark the right paddle misses and the score updates.

    3. The left will occasionally NOT miss on the minute mark and the ball keeps bouncing back and forth until the next minute mark at which time the left paddle misses and the minute score updates by 2.

    I have seen all of these things happen often and was wondering if I have another problem or if these are “features” needing a tweak?

    • Hey Paul, I’ve seen 1 and 2, but not 3. You are correct there are erm ‘features’ at the moment. I can’t remember I coded it so long ago but I think I pick a random point on the balls journey toward the bat, then work out where it will land, and move the bat toward it. I suspect sometime the bat doesn’t make it in time, i.e. I’ve assumed the bat can always make it, but on some random picks the calculation is made too late or the ball is going too fast.

      When (if) I get time I’ll have to poke through it all, or feel free to investigate!

      • Thanks Nick…. Thought I was seeing things there for a while… ;)
        When and if I ever get my coding up to speed I might just try and see what I can do.

        Still a great project… glad you made it and am very happy with mine. If somebody else looks at it and mentions one of the features I’ll just say… “Hmmm, that’s funny are you sure?” Since they happen randomly, I might just get away with it…. LOL

        Paul

  128. Hi Nick, just saw your message requesting an all in one PCB for your clock… funny tho that your clock was my very first project with arduino, PCB designing and making… so I have a version of your work that is all on 1 homemade PCB… if you are still interested, give me a shout

    • Hey Rob, glad you made the clock – love to see the all in one PCB you have. Gary – few comments up (down?) has also designed one thought not had anything made yet.

    • Hey again, I have been playing around with the new version of the code, I love it but I miss something … back in the days when I built that clock, I switch from your code to Wolf’s Spoor ( http://pcbo.dcs.aber.ac.uk/blog/projects/arduino-pong-clock/ ) because I really wanted to have the space invaders mode on my clock…. any chance that you try to incoprorate this mode into your code ?? I went back to Wolf’s to ask him aswell, but it doesnt seem to be active on this project anymore … could you try to insert it in your next version of the clock ?? (my programming skills arent good enough to do so .. I’ve tried, but I end up with bugs, glitches and all ^^)
      be carefull tho if you try, you need to use the font that’s included in the tar.gz otherwise it wont work

      Thanks in advance

      PS : check your actual code, line 1953, you put “bool” instead of “boolean” … it may be the reason why some ppl experienced glitches on the 31st of January … just my 2 cents ^^

      cheers ;)

  129. Hello.

    Today when i opened my eyes, my clock is again on Friday 31 January.

    What happen, what should i do? Have you already seen this problem?

    Regards.
    Jerome

    • Oh I’ve never seen that before. Are you running the latest firmware? If you upload that again it should reset everything.

      • You know what – mine is the same, only I didn’t notice as I had it in random mode. It’s an error in slide mode – the 3 from the 31sst doesn’t get cleared from the display for some reason so it appears as 32. If you change mode or change back to slide mode it goes. I’ll have to look into my dodgy programming some point and issue an update. Sorry about that! Nick

      • Ok.
        I push the button to display the day and when the program came back in slide mode, the number of the day is ok.

  130. Has anyone thought about creating a laser cut case for this? I was thinking about designing one once I had built my clock. I was thinking ABS plastic sides then clear perspex front?

    • Yes I was thinking of getting one made at one point. I wanted an opaque white diffuse plastic box – the kind that looks white until the LED lights up behind it. Be interested if you come up with something.

  131. I’m discovering this exciting project! Very thank you to you to share your work.

    I wonder if you know about the real power consumption. Of course it depends of how many leds are on at a certain moment but we can measure an average and a peak. According to the specs, I though about something like 50 mA for the Arduino and 100 mA for each led panel. But you talk about a power supply of 150 mA, is it really enough?

    My idea is to supply power with batteries.

    Regads,
    Matock

    • Hey, thanks for the interest. I’ve never measured power consumption, I picked 150 mA as that was the USB PSU I had and it worked. I think you’d need quite a powerful battery to keep it running for any length of time. I don’t know of any LED clocks (even the 7 segment ones) that run of batteries for that reason.

      If you really needed batteries, maybe you could implement something in the code that only lit up the display when you pushed a button.

  132. Yes sure, but displaying Pong IS the funny goal. I calculated that even with optimistic consumption, big batteries won’t be alive for more than 10 days!
    I definitively will use a wired power supply.
    Thx a lot.

  133. j’ai fait aussi une horloge avec le méme type de matrice que toi sauf que j’aimerai afficher la température a la place des “ND” ou “TH” dans le mode normal , j’ai in capteur LM35 sauf que je n’arrive pas a faire afficher ma valeur de mon capteur , a chaque fois que j’essaye les matrice m’affiche rien pourtant le code et bon mais je ne sais pas comment on fait pour que ma valeur soit afficher sur la matrice , si tu a un conseil je le veut bien
    merci et en tous cas encore une superbe idée ton horloge c’est du bon boulots :)

    • I also did a clock with the same type of matrix as you except that I’d like to display the temperature instead of “ND” or “TH” in normal mode I in sensor LM35 except I don ‘happen to do not see my value of my sensor every time I try the matrix shows me nothing though the code and good but I do not know how it’s done for my value is displayed on the matrix, if you have advice I willing
      thank you and certainly still a great idea your clock is good jobs :)

      • Hey, really hard to say what’s wrong -especially when you say your code is correct. I’d try adapting one of the very simple functions like the one that shows the version when the clock starts up. See if you can get it to print the temperature digits there. If that works, you can transplant the code to the clock functions that are a bit more complex. Good luck with it

  134. Good morning,

    my name is Francesco.

    A year ago i bought a led panel “sure electronics P4 32X8 3208 red led
    dot matrix unit board spi like” and the “Arduino UNO” but i
    can’t
    understand how to use the panel program.

    I would like to add some buttons and potentiometers to the system.
    For example: pressing the button “1” display lights up with the
    saved
    name wich runs for 30 seconds at least. Pressing another button display
    lights up with another saved name wich also runs for 30 seconds at least
    and so on for the other buttons wich have to recall the saved words.
    I also would like to know how to add two potentiometers: on for slide
    speed control and one just for time control.

    I’m waiting for your answer and i thank you in advance.

    Cordially,
    Francesco

    • Hey, I don’t see why not. I’m sure there are snippits of code you could use that check a light sensor. You’d just have to convert the range of numbers that it produces into the 0-15 range I use for brightness in the clock script.

      Then put a brightness check in so it gets called every so often. Maybe stick it in with the get_time() function.

      Nick

  135. hey Nick
    my watch does not run in ver. 5.1 all text will are different, only the digits displayed correctly
    run perfectly with ver. 5.0?
    can you help?

  136. hello again
    it worked thanks for the help
    now I’m trying to change the clock to Danish. so now there is a copy in Denmark once again thank you. J

  137. Hi nick,
    Great job, as always ;)
    quick question : what about the All in one PCB… are you still working on this ??
    quick question # 2 : any chance to see the Invaders from Wolf’s clock (http://pcbo.dcs.aber.ac.uk/blog/projects/arduino-pong-clock/) any time in your version, since he doesn’t seem to be active on this project anymore and his version was based on your work? It would be awesome :)

    Anyway, thanks for this great project and for all the updates you ve done in the past couple of years to make it even better, everytime ;)

    cheers

    • Hey, One of the guys on the comments here was working on a board, he was doing a few tweaks last I spoke to him.

      I did try and put invaders mode in, but I couldn’t get it to work. I’ll have to have another look at the code. The icons are in the new font in 5.1, just it used yet!

  138. hey nick
    I changed my watch to Danish but Danish has three letters more of the alphabet (æøå)
    these letters can i add them too the front.h labery ?
    and how?
    best regarts j

    • Hey, I’ll try and explain…

      The 5×7 characters are stored in font.h as hex in the myfont array – the first array listed. There are 5 hex values per letter, one hex value for each column of the character. If you convert a hex value to binary (e.g. using an online calculator) that gives you the pixels in the column. E.g. for the letter A the first hex value is 0x3F which converts to 00111111 which is the pixels for the left hand column of the A. (The right hand bit in the above being the top left pixel). As the letters are 5×7 and the hex values 8 bits, the first bit isn’t used and is always 0.

      So you’d need to design new letters, split them into columns of 1s and 0’s and convert to hex. Then add them to font.h at the end of the myfont array, and update the number of chars in the array at the top of the font.h file from 80 to 83.

      After that you need to alter the main code in the ht1632_putchar and slideanim functions. Add more “else if” lines for the new chars. E.g.

      else if (c == ‘æ’) {
      c = 80;
      }
      else if (c == ‘ø’) {
      c = 81;
      }
      etc…

      Hope this makes sense!

      Nick

    • Yeah should do. You’ll need to lookup the pins on the Mega and adjust them in the sketch code accordingly though.

  139. Hey,
    First of all I wanted to say thank you for this project, I have used it as base for my 2nd year uni project I have just about finish this project and for the uni requiremnts I have to made PCB and power supply in order to create it all in one unit, also I have added another mode to display short message as my girlfriend request it haha.
    Looks pretty cool I will make and upload video later as it is late now, I have all of the schematic and PCB files if you want to include them.

    Good luck and thanks again
    Rafal

    • Hey, really glad you like it and it helped out your Uni course. Be great to get the schematics to share with people! Love to see a video too. Nick

  140. Hey, I built the clock a while ago and now I am leaving it on to run and after a while the displays start glitching. There will be LED’s that are on that are not supposed to be on or LED’s that are off that are supposed to be on. Any ideas whats going on and how to fix it?

    • Hard to say, could be dodgy power. Maybe try another supply. Also check there aren’t any loose wires or anything shorting out the arduino pins

  141. Hi Nick, Hi all,

    I made a fork in your code with a French translation of your Pong Clock. The starting point was the 5.1 but I added many features and fixes:

    * French translation with French accented letters
    * adding the Invaders mode based on the work of Richard Shipman on the Wolf’s Spoor blog http://pcbo.dcs.aber.ac.uk/blog/projects/arduino-pong-clock/
    * adding a “Special Event” function to display a welcome message every 15 min on specific days (ex: New Year Day, Christmas, etc…, cf. is_special_event() function)
    * adding a sleep mode defined in a setup sub-menu with sleep and wake-up hours, to reduce the power consumption during the night (<70mA for Arduino Uno)
    * setup data are persistent (stored in the EEPROM memory)
    * refactoring of the code (reorganisation, clean unnecessary variables, maximum use of const, optimisation of variable memory space)
    * some fixes (array sizes, stack overflows, mistypes…)

    I called it 5.1FR. Here is the download link.
    https://dl.dropboxusercontent.com/u/17125497/PongClock-v5.1FR.zip

    And again very thank you to you for this fantastic work and to share it with us. I hope that my little contribution will interest French readers.

    Amis bricoleurs, à vos claviers !

    Enjoy,
    Matock

    Tags: French translation, traduction Française

    • Hey,

      I didn’t get a chance to say -but your version looks great. My French is a little rusty but I managed to find my way around! I’m sure you’ll get a few people wanting it translating back to English so they can use the extra modes. I’ve added it to the main article page so people can find it.

      Thanks again!
      Nick

      • First of all, thank you Nick to push my work on the center stage!

        Well, the English (re)translation shouldn’t be so hard even if you don’t speak French. I started from your English version so it would be easy to revert back the original language by comparing the code. Moreover, I use to program in English, so my code is commented in English, not in French.
        The main differences are in the word_clock() function (just words() in mine), because the way to write numbers in french are so different, that I totally rewrited the function. So it would be better to just revert back the original function.

        But if somebody is blocked, of course I can help.
        Matock

      • Hi Matcok, thank you for this version for the Pongclock its greatly appreciated. Unfortunately i have struggled to translate it into English. I’m a complete novice when it comes to programing the Arduino. Would it be possible to make the v5.1EG available.
        Thanks again for all your hard work.

  142. Hello Matock,
    Nice work on this variation of Nick’s wonderful Pong Clock. I have been happily running Pong Clock on my mantel for quite a while, and I was very happy to assist with testing of Nick’s upgrade to the current Arduino IDE compatible version.
    It would be wonderful, as Nick mentioned, to have an English version of your work as well.
    I have no French language skills at all, but I would be very interested in the extra features that you have so kindly implemented!

    On another note, I recently purchased a pair of the very nice and well made 16×24 LED panels that are sold from my favorite Maker Vendor:
    http://www.adafruit.com/products/555

    These use the same Holtek 1632c controller, and I wired them to the board that I built for Nick’s clock, merely a matter of connecting the correct lines to the connectors which have a different number of pins. It works, and all of the LEDs light up, I can see the correct activity, but the matrices are all out of order, rotated and backwards.

    My programming skill are infantile, and even with a little bit of coaching from Nick, I am afraid I am not up to the task of making it work. There is some serious difference in the wiring of the panels, and the libraries that are provided by the kind folks at Adafruit.

    Their examples work fine, and I did manage to make a very simple clock code with their libraries.
    https://forums.adafruit.com/viewtopic.php?f=25&t=62193&p=314931&hilit=16×24+LED#p315202

    No where near the great kit that Nick has created. I must say that their font library is also not as good looking as what Nick is using. The large font is really bad etc.

    I would love to have a version of the Pong Clock that ran on these panels as an alternative to the Sure displays, which are a bit difficult to get, have a goofy form-factor, and are poorly supported in my experience. I also would be happy to see the additional support for the Adafruit company, as it’s founder has done so much for the Arduino and maker community. And of course, more recognition for Nick’s generous work on the clock would also be a nice thing.

    I would be happy to provide a pair of these panels, as I have an extra set, to anyone who would be interested in working on a code translation that would correctly run Nick’s Pong Clock. I would be happy to document the pinouts too, if there was any confusion with that detail.

    Peace!

    Kirby

    • Hello, I have the same matrix, I am not very good for programming but I find a patch for theses beautiful adafruit matrices. http://www.adafruit.com/products/555
      You should copy this and past where you need to paste the back to front patch of Nick in is tutorial higher. So you should past this in TWO places.
      This code exchange the x with the y in each 8×8 matrices and it correct the differences between the two.
      if (x >= 0 && x = 0 && y = 0 && x = 8 && y = 8 && x = 8 && y = 8 && x = 0 && y = 16 && x = 0 && y = 24 && x = 0 && y = 32 && x = 0 && y = 40 && x = 0 && y = 16 && x = 8 && y = 24 && x = 8 && y = 32 && x = 8 && y = 40 && x = 8 && y <= 15) {
      int a;
      a=x;
      x=y+32;
      y=a-32;
      }

      • Hey I have the same matrix and i apply your patch but it doesn’t work. Do you mind sharing me your code pls?

  143. Hi!

    Inspired by all the hard work here, I created my own clock, in Dutch, based on Matock’s French version, and added a IR receiver to pin 8 to switch modes remotely with a el cheapo remote control (dx.com). To realize this, I had to trim down the size of the IRremove library, which I included in the zip-file

    https://www.dropbox.com/s/b5q8n8a046glvou/pongclock_NL.zip

    I’m a little novice in programming, and there are still some small bugs around, but hey :-))

    • Excelent there is no limit.

      My next idea is to add an ‘Automatic’ mode for the brighness menu, with a photocell, to adjust brighness automatically according to the ambient light.

      Very easy to do with just just one photocell and one resistor (ex. http://playground.arduino.cc/Learning/PhotoResistor), one analog input port, and a little bit of coding of course..

      But unfortunately I have no time currently.

      • Matock, i find the FR version of the clock awesome….But i wanna use the arduino mega instead of the uno to have more memory to add some more clock modes. In your Fr code, in the Slide mode the digits refresh from above to under…. if i want to let them slide from under to above, what i need to change on the code? Can you help me with that? Big thx fot that….sorry for my english.

  144. Hi Nick,
    thanks for all your hard work which has enabled all us “Gadgeteers” to build this great project.
    This is my first Arduino build and although I’ve got the clock working, I do have a query as my DS1307 doesn’t seem to be being read. I have used a DS1307 RTC module like you have used on your other clock project, – my question is, does the code need to be adjusted in order to use this module because as far as I can see the actual connections to the arduino uno are the same as what you have done on this clock?!
    Any advise would be greatly received.
    Cheers and “happy new year”
    Mick.

    • Hi Mick, should be the same – its just the same chip on a daughterboard normally in those modules. Make sure the battery is connected ok too.

      If not there are some simple example sketches you can download from a quick google that try and read the clock so you can test ot

      • Hi Nick, thanks for your reply. I stripped it down completely this morning and remade it. 3 of the ds1307 modules were not keeping the time when I unplugged the clock from the power and plugged it back in again. I tried a 4th and it seems to be ok, I also tried a ds3231 module and that seems to be fine – saying that, none of the modules are making the LED blink in front of pin 13, and I’ve tried it on 4 different Arduino Uno’s! – so I’m baffled there.
        Do you think that an Arduino Nano would be man enough to be used on this clock?
        I’ve ordered the components to have a go at making your mini LED clock, so I’m looking forward to having a bash at that.
        Also tried to load the French space-invader code but I could get past the verifying step, keep getting the message “myfont was not declared in this scope”, but might have another look at that later, although I do struggle with the coding (-:
        If and when I’m completely up and running I’ll send you some pics of my efforts.
        Thanks again Nick,
        Cheers
        Mick.

  145. Hi Nick and everybody else,

    I build two clocks based on your design and code, so pong “awesome_clock_counter = awesome_clock_counter + 2” ;) .

    There are some things in the code that I would like to fix:

    Sometimes it looks likes the bat misses the ball (when the ball travels relative straight across the field and the bat hits (or should hit) the ball on the corner of the bat).

    I also fixed a bug that the clock runs one minute behind (this bug is also in Matock’s version is called 5.1FR):

    “//if coming up to the minute: secs = 59 and mins < 59, flag bat 2 (right side) to miss the return so we inc the minutes score
    if (rtc[0] == 59 && rtc[1] 0) {
    bat1miss = 1;”

    We will never run a minute behind. A con is that, at most the ball travel time takes 4 seconds to ping, pong across the field. E.g. the clock runs at most four seconds behind (depending on ball postion and direction on the field).

    https://db.tt/40wxOHmC
    https://db.tt/1wrh3hCD

    • Hey, the clocks look awesome – I love the cases. Really glad you made them!

      If you want to send me an updated sketch with the fixes in, I can post here for others.

      Cheers
      Nick

      • Hi,

        The cases are really cheap Ikea frames =>

        For the 5mm LED displays.
        http://www.ikea.com/gb/en/catalog/products/20243540/

        And this one for the 3 mm LED displays:
        http://www.ikea.com/gb/en/catalog/products/20243535/

        I think it’s a perfect fit, especially with the passe partout. I drilled some holes in the side of the frame for the two buttons, it really looks cool (of course this is my opinion).

        Because I used HTML code in my previous post the important part is missing:

        The clock could run a minute behind if this statement is true while the ball is close to the line and so crosses the line at 59 seconds. In that case the clock won’t update because at ‘restart’ it’s still ’59’ seconds. And so the clock gets updated with the old value and so runs a minute behind.

        This is the original code:
        // if coming up to the minute: secs = 59 and mins < 59, flag bat 2 (right side) to miss the return so we inc the minutes score
        if (rtc[0] == 59 && rtc[1] < 59) {
        bat1miss = 1;

        The fix is:

        // if coming up to the minute: secs = 0 and mins 0) {
        bat1miss = 1;
        }
        // if coming up to the hour: secs = 0 and mins = 0, flag bat 1 (left side) to miss the return, so we inc the hours score
        if (rtc[0] == 0 && rtc[1] == 0) {
        bat2miss = 1;

        We will never run a minute behind. A con is that, at most the ball travel time takes 4 seconds to ping, pong across the field. E.g. the clock runs at most four seconds behind (depending on ball position and direction on the field).

        I will post my (small) edits soon (still applying some minor edits).

        So thank you very much for this great project!

    • Hi Mr. Breaker,

      I saw the same problem in my clock a couple of times. I want to update the code with your fix, but I don’t seem to get it right e.g. make it compile.

      I can’t swap the original code:

      // if coming up to the minute: secs = 59 and mins < 59, flag bat 2 (right side) to miss the return so we inc the minutes score
      if (rtc[0] == 59 && rtc[1] < 59) {
      bat1miss = 1;

      For the updated code:

      // if coming up to the minute: secs = 0 and mins 0) {
      bat1miss = 1;
      }
      // if coming up to the hour: secs = 0 and mins = 0, flag bat 1 (left side) to miss the return, so we inc the hours score
      if (rtc[0] == 0 && rtc[1] == 0) {
      bat2miss = 1;

      It seems I'm missing something..

  146. Hello partners.
    I do some day the projector “Mini Led Clock” and now I’ve settled on this that looks great.
    My question is that when compiling I get this message:

    Low memory available, May stabillity problems occur.

    Although it appears that record successfully, I have not tried that yet I need parts for the project.

    Thank you very much, and forgive my English

    • I’ve not seen that error before. Does your arduino have 32K RAM? Are you set to use the right board in the compiler.

  147. Fantastic clock! I recently built one of these with a few changes. I used one of those Arduino Nano clones that is much smaller and only cost $2.20, and I used a DS3231 clock module to improve accuracy. I modified the code slightly to turn random mode on by default but I plan to make all these settings non-volatile. It also needs a way to set the seconds, perhaps I’ll just try to add GPS sync. These are totally cool and very innovative, I plan to build a few more of them to give to family members as Christmas gifts.

    I’ve noticed one bug so far but have not had a chance to look closely through the code. Three times now I’ve caught it not advancing the score in pong mode and it ends up behind until the next minute when it advances by two minutes and is then correct. This has occurred at random times, not at the top of the hour.

    • Great you built it! Those improvements sound cool. I think someone else spotted that bug, they were possibly going to send me a fix but I don’t think I got it. You might want to have a read through the comments here for it.

  148. Hi Nick,

    Haven’t looked at my pong clock since late 2012 believe it or not. Not because it isn’t cool but loads of life stuff happened lol. I have just looked over the code as it stands and I have to say I like this a lot

    “if (! ds1307.isrunning()) {
    Serial.println(“RTC is NOT running!”);
    ds1307.adjust(DateTime(__DATE__, __TIME__)); // sets the RTC to the date & time this sketch was compiled”

    Very swish :) At the time I was messing about with it, I got some limited animation running but it was a bit buggy. Going to take it up again but I think I’ll chuck everything I wrote out and start again. Thanks for the project and all the late nights it has (and will again) give me :D

  149. Having my first go at this, ordered all parts that just arrived, thought I would test the software first.

    On a Mac Latest OSX 10.11, Arduino 1.6.5

    Imported libraries etc as per instructions, wont compile….

    In file included from pongclock5_1.ino:45:0:
    /Volumes/Macintosh HD 2/Users/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] = {
    ^
    /Volumes/Macintosh HD 2/Users/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] = {
    ^
    /Volumes/Macintosh HD 2/Users/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] = {
    ^

    • Hi, Can you go into the libraries folder and open font.h with textwrangler or similar.

      Edit the 4th line so it has the word const in:

      unsigned const char PROGMEM myfont[80][5] = {

      Then do the same for the other line numbers mentioned – 94 and 108.

      Nick

      • Great, fixed first error…. now do I do the same for the others?

        /Volumes/Macintosh HD 2/Users/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] = {
        ^
        /Volumes/Macintosh HD 2/Users/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] = {
        ^

    • Built, operational… a few Display challenges… had to walk away a few times…

      Thanks, great project…. would love to add temp to it, and it cycle temp display….

      Now, if I could only find a way to send you bitcoins I would…. just spent an hour and a bit confused… will keep trying!

      • Yeah I know the walking away thing! Glad you got it built!

        Temp display might not be too hard, I think there are arduino projects out there that read from a probe. Then you’d just need to add to the clock mode a new page that shows the temp in digits… might take a bit of playing around but shouldn’t be impossible!

  150. Hi all,
    I am trying to work out Andy’s version (RGB Pong Clock), now realize that probably it was a bad idea for first project :-) but I definitely need help.

    I am using a MEGA and following adafruit’s tutorial, I can run the demo succesfully.
    So, looks like MEGA is communicating with RGB matrix, no problem.

    But, I get an error when trying to verify Nick’s or Andy’s scetch, following their specific instructions.
    Nothing works out.
    initially I was getting an error “no such file or directory”
    Fixed this, but now I get “variable ‘noise’ must be constant” etc..

    I could probably figure out the solution, maybe it will take 6 months.. :-)
    Would appreciate anybody stepping in, to help.

    Maybe contact via mail, so I can relay the exact errors and hopefully correct this, without using the thread’s space here.
    Mine is temeterson at yahoo.gr. Any help welcome
    Regards

    Peter

  151. Hi Nick. Thanks for the great clock!
    Couldn’t resist adding this clock to my collection.

    I have added PIR control to turn the displays off when no one is in the room, master Clock sync, a DS3231 module, remote control and a few other tweaks.

    I have just started to put the design on my clock site here. http://home.btconnect.com/brettoliver1/Pong_Clock/Pong_Clock.htm

    I have added credit to you and links to your site. I hope this is OK?

    Regards.
    Brett.

    • Hey Brett, that’s absolutely fine, your clock looks awesome in the white frame and the extra features are very cool. Glad you are are keeping the project alive!

    • Brett, this looks brilliant..
      Some of the things I had “planned” to do with the code and share… time poor my side…
      BTW the links on your site dont work… was trying to take a look at the code…

      • The page is still “work in progress” much more to follow soon…………..
        I have put a note saying this on the link to this page but will add it to the page itself as well.

    • Hey Sam, might do. The clock needs 5 I/O pins – 3 for the displays and 2 for the buttons so you’re OK there. Then it needs i2c which it says is provided by UCI – i’m not sure what that is so you’d have to investigate, and also change the pins allocated at the top of the code to whatever pins you choose on the attiny.

  152. Hi Nick, great project. I’m in the process of constructing my own. One point – adding “const” to the start of lines 2212 and 2271 squash a couple of warnings with the latest version of Arduino compiler (1.6.8).

    I’ll post a picture of the completed clock when I’m done.

    Cheers!

    Alexander

    • Ah thanks Alexander. It seems every release I have to change the code to work with the latest IDE. I’ll try and update it again when I get time!

  153. Thank you very much, nice watch. The only problem is delayed, any solution? Thank you and sorry for my bad English.

    • Ah, I had this too. I replaced the crystal and it fixed it. (The first one I got was a cheap one from eBay)

  154. Nick

    Still enjoy my clock and have made a mod to show room temperature as well.

    I’m thinking of making an arduino shield pcb that I would put in the community so make it easier to put together.

    Would you be open to sharing the schematic to save me starting from scratch?

    Many thanks

  155. #Embarassed Oliver :) sorry Nick, got mixed up!

    I have built based on your design Oliver, modded a bit and now want to build an all-in-on Uno Shield with RTC Clock and my temperature mods and nice socket to plug the display in.

    Plan to share it in open source, if you could export the drawing in anything that could be imported by http://www.easyeda.com then thats fantastic, if not, i’ll give it a crack! Just trying to get a head start!

    • No worries – glad you found the schematic! The mods sound great. Be fantastic if there was a proper clock shield for people to use.

    • Hi I had had a look at easyeda and it can’t import Livewire files. Livewire will only export in it’s native format so you will have to start from scratch:(.

      Will be interested in you final design with Temperature mods.

      Regards. Brett.

  156. Here’s my adaption of the code (credits to Nick and Oliver) – https://github.com/anthonyjclarke/PongClock/

    Displays Temp, but lots of code tidyup required, and now outgrown a UNO, needs Leonardo – would love help to fix that!

    Am building a Shield to make this easy to assemble, in meantime found this https://www.tindie.com/products/rajbex/16×32-rgb-matrix-panel-with-an-arduino-uno-shield/ and may either adapt code or continue building my shield with embedded DHT22 / Other Sensor.

    Feel free to help here, was my first real Arduino Project!

  157. Hi,
    Is there any difference if I use a smaller matrix like two matrix of 8×8?
    Should I change too many connections?
    Thanks, for sharing a great project like this :)

    • Use the matrix i have – there are 3 or 5mm led versions. If you pick something else it may be completely different and not work

      • Even with 2 of them out will mean a lot of changes. If you are not confident with it I’d use the ones I recommend.

    • Hey I can’t remember but just look for Ds1307 with crystal and coin cell. Or try Sparkfun or adafruit or cool components

  158. Obviously, you will need to solder 4 wires to the plate through holes on the board that the link refers to. The signal line names are the same, and the voltage connections should also be self explanatory. Actually, having all of the items (battery, battery holder, RTC chip) on a single board makes it easier to integrate into the design. You just need to solder 4 wires that connect to the appropriate connections on the rest of the Arduino hardware.

  159. Have just completed my 2nd Pong Clock.
    I have added a temperature display in my favorite Slide Mode. I have also changed the Random mode to just show Slide then Pong every few set mins and seconds.

    I have also added a countdown timer that plays a choice of MP3 sounds when the timer runs out.
    The timer is built into the Normal mode.

    I’ll add full details as soon as I can on my site http://home.btconnect.com/brettoliver1/Pong_Clock/Pong_Clock.htm

    • Brett, loving v7.5… I’ll trash my poor version with Temp. One thing… that I really want and would love your “guidance” on is how to alternate the Temp / Date display on the Slide Mode… thats what I “REALLY” want :)

      • Hi Anthony. Glad you like my new version.
        If you look at the code line 2261 “void slide()” the code for the temperature display is in there. I suppose to add an alternating date display as well you could call the date at set seconds as if you pressed the date button I think button “B”. This would display the date then revert back to time and temperature. You could call this using the code in line 3169 “void set_next_random()” as an example and call “display_date()” every say 30 seconds.

  160. Hey all!
    I just became aware of a new Arduino compatible board that includes the DS3231 RTC all on the same board! Something I have been wanting to design, but my skill set was lacking. I have been cobbling together boards with the 3231 and other parts. Works, but love to see a reduced parts count!
    Check it ou!

    https://www.tindie.com/products/4hackrr/eepromduino-rtc-v13/?pt=full_prod_search

    I have yet to get the board, but I am excited to find it, so I can complete a dusty clock that I started a while ago.
    The only trick part I see is integrating the connectors for the LED panel. I think I have, or there might be an IDE connector breakout board that will simplify that issue.

    A fond greets to Nick! Having touched base in a while.
    Still have found no solution to those very nice LED panels from Adafruit. Nobody seems to want the challenge, and I am too dumb! :-(

  161. Hi All,
    Just received a few of the new (version 2) sure 0832 boards; there is now no dip switch for chaining and only one cs pin. I’m at a bit of a loss how to wire these. Any tips from any of you who have come across these boards?

  162. I’m looking at designing a custom PCB for Nick’s pong clock. Just trying to see if there is any interest? It would have a choice of powering by DC jack (with voltage regulator to protect chip) or USB(only power by usb no data), no arduino required it would have a standalone atmega328, icsp header for programming, ds1307 RTC circuit, box header for connecting to displays. onboard buttons and terminals for mounting the menu/mode/adjustment buttons. maybe a space for a DHT11/22 sensor.

    Please let me know your thoughts/interest or any features you would like to see.

    These would be professionally made by a PCB house. Will be unpopulated for you to solder your own components, but I may be able to offer a populated board.

    Hope this is OK with you, Nick?

    • I would love to have such a board. I wanted to produce one myself, and started to but never managed to get one completed. I was wanting to have a version that would plug right onto the LCD panels of both sizes, but at least the smaller one. I started to modify a design of a board that plugged into and RGB matrix as a start https://nootropicdesign.com/store/product/rgb-matrix-backpack-kit/ . They used to have posted the open source Eagle design, but at a glance I do not see it now. I would highly recommend a better RTC, the DS3231 specifically. It is much more accurate, the only caveat is that it is a surface mount component. There are small boards like the ChronoDot that have this chip. I have built several of these clocks, and I am a huge fan!

      • Hi Nick!

        Like wise. I hope that all is well.

        Been having a tough time over here, been without a job for over two years now. Have not been doing much Arduino/LED stuff lately. I should probably mess with it all a bit.

        Peace.

      • Hey, Sorry I meant to reply to you before. That sucks about the job, sorry to hear. Fingers crossed you find something soon.

    • Ok, I’ll get something drawn up in eagle over the next week.

      I’m now thinking of maybe putting both the DS1307 and DS3231 on the same PCB if I can make the pinouts work, so you could solder one or the other. Gives a little choice for anyone not able/wanting to solder SMD.

      Also I’m thinking of either a switch or jumper on pin header to select the power input, as wouldn’t want someone to try and power from both inputs.

      Once again please let me know your thoughts on these options!!

      • Having had a look at the DS3231M datasheet, it may be worth me doing a first revision with all thought hole components and maybe at a later stage doing a SMD revision, I would like to get a option of either RTC on the same PCB, but I may have to do a little more research.

        Has anyone had any experience of building a DS3231 RTC from scratch, not using one of the modules?

      • I like the idea of the ds3231. It might also be handy to bring the unused io ports from the atmega out to a header for people to use.

        Maybe a a couple of spots for an optional power and pin 13 activity led too?

      • No to burst any bubbles or cause disinterest in this great effort, a little while ago I posted this interesting clone that included a RTC. I really wanted to get one to try with the Pong clock, but funds are tight right now. I think it could be useful in and of itself, and perhaps also an inspiration.

    • Nice to see that the project is still active! I’ve designed a PCB to make assembly easier. It integrates an Arduino Nano as this is the cheapest and easiest option I found. I also added an option to use a DCF77 receiver instead of the RTC, because in my opinion you should not have to set such a nice clock manually. I will post both the PCB files and the changes to the code for DCF77 support soon.

  163. I don’t think that the un-used io ports will be too much trouble, I’m trying to keep the board to a 2 layer board, to keep the cost low. once you go above 2 layer the price soars, also working to a max size of 10cm x 10cm.

    Pin 13 LED is already in the design I have in my mind, also a power LED. DHT sensor also in design. Not too sure what I2C sensor you would like to see? may pose a problem as most I2c breakout boards have different pin layouts.

    As for optional power I was thinking of a 2.1mm DC jack and a SMD Mini B USB port, any thoughts on this?

  164. Done some work on the PCB, today. Just the power circuit left to do. Managed to add DS1307, DS3231, DHT, headers, header fro BMP180/183/280, ICSP.

    For the RTC, I used a 1220 smd battery holder can be changed if necessary.

    Schematic is very messy, needs a clean up.

    Anyone advise on how I can upload an image?

  165. While tidying up the schematic I have noticed some errors. Pin 13 LED is actually connected to Pin 7 (not sure if this can be changed by code)!! and the way the battery holder is connected means battery will be back to front! I have now changed these.

    I’m also wondering if I should add a FTDI header or substitute the ICSP header for FTDI? What are your thoughts?

    The DHT sensor is connected to D1.

    Looks Like V1.2 coming along soon.

  166. Prototypes have arrived, now to get sone soldered up to test.

    There are 3 errors on the PCB, my fault, not manufacturer.

    Pin 13 LED is connected to Pin D7.
    Battery holder connected backwards.
    A0 – A5 are labeled wrong way round!

      • Starting to think about layout of a board using a NANO, what would you like to see? All the same as the designed board i.e DHT, access to pins, power circuit (not sure power circuit would be worth it TBH as a nano is self powered!).

      • I actually designed such a PCB last year… Including the possibility to connect an RTC like in the original design or a DCF77 receiver. Been meaning to post the details online since then. As it looks like there is interest I’ll do my best to speed up the publishing.

      • @Gary Same design board, but yes, there is a lot that can be removed as the power / Usb etc all on board, so its more about the simple I/O connections / switches etc.. as well as the PIR (which came is later versions of the s/w).
        I have on my list a grand plan to uplift the code / drivers to ESP8266/ESP32 and then have n/w time checks etc, so with this initial board revision, I would imaging changing it later to something like a Wemos https://wiki.wemos.cc/products:d1:d1_mini_pro would be simple.
        All very exciting, and looking forward to being able to support / build!

  167. This morning I have soldered a board up and tested with the ‘Blink” sketch, pleased to say it works. I’m still waiting for a couple of parts before i can test on pong clock.

    Using a jumper to select between DC and USB power.

    I’m not good with code, I was wondering if, in the pong clock code there is code that give led activity to blink the led for the seconds? (hope that makes sense?).

    • It has been a while since I have used a board that I did not build from scratch, but I seem to remember there being an LED blink in the sketch, which serves as an indicator that the clock is there and working. I may be wrong.

      • There is code that flashes the Led in D13… IF movement detected on the PIR… out of interest, assume in PCB implementation the PIR connection is pulled out as a jumper?

        //flash arduino led on pin 13 every second if PIR motion detected
        if ( (rtc[0] % 2) == 0 && digitalRead (PIR) == HIGH )
        {
        digitalWrite(13,HIGH);
        }
        else{
        digitalWrite(13,LOW);
        }

      • The original sketch does not have PIR implementation, and as I said, I believe there is a blink happening if the RTC is detected and functional. Just for clarity sake.

  168. Testing has gone well. All working on clock panel. changed code for led to flash on seconds to D7.

    I looking to get a PCB made to correct the mistake i made on the prototypes, but what cost would you guys team reasonable to pay for a un populated PCB? need to know interest before I place an order.

    I will also order Pong Clock Nano PCB’s at the same time. will upload images of the board soon.

    If anyone is interested in a prototype PCB (with mistakes, but working,) let me know.

    • PCB’s cost me £8 each to get produced, I would sell them at £8 + shipping.

      I have 9 of the prototype boards, due to the error’s, I would be happy with £6 including UK shipping.

      • Gary. For your effort / investment in time. I’m in. I’ll take one of each. More if it helps.
        Are you including PIR connections in next version?
        Looking forward to seeing drawings / sch files etc.

      • It would be cool to have one of the final ones for sure!

        Perhaps we should put a kit together for people.

        Also, for future ideas… what do you think about having an option on the board for an idc header that connects directly to the led board? Ie no ribbon cable needed, just the cpu board stacking directly on the led board?

      • I mentioned a direct connect board, a few times earlier. In an earlier post, I also posted a link to a Nootropic board that I have that does just that. Here is the link I could not find earlier, with the schematic http://nootropicdesign.com/matrixbackpack/design.htm I know this is for a different LED board, but the concept is the same. I think I hand wired a board that did that in the past. I would have to look carefully, but I believe that if you were to solder a female IDC connector on the bottom instead of the top, it would connect directly since the pinouts are a mirror image. Not sure of the placement is optimal though, and the placement would likely be a problem with the bigger LED panel

      • @anthonyjclarke I want planning to add the PIR, let me know what pin it is on and it will be added. It does just require VCC, GND and a Data Pin? or would you want to mount it on the PCB? to mount on PCB will be fine for the nano version, but space is limited on the full version.

        I have to order PCB’s in 10’s so you can have as many as you like!! let me know what you want, please.

        I have sch files drawn for both the nano version and the full version, just have to draw boards, will get that done today and tomorrow, with the view of placing order next week.

      • @ Nick, always a possibility to add an IDC header!! would require a little research.

        I’m more than happy to provide a kit and possibly a soldering service, but its your project so your call!

        I’ve added pull up resistors for the RTC not sure if you were using the internal ones in the code, but have been researching and found all RTC’s use pull-ups.

        I could remove the ds1307 and leave just the ds3231, what are peoples thoughts on this?

        Lastly Nick is there a way to contact you directly?

  169. @Gary, I’m not qualified to comment on your clock question, but Brett Oliver has made some comments / changes in his Fork of the H/W and Code. If you do get some volume interest then it would be worth you / Nick heading over to https://blog.squix.org/2017/04/esp8266-weather-station-shipping-from-a-fulfillment-center-in-china.html and have a read around Daniel’s journey on this about selling kits…. there are a couple of video blogs that make a good read / listen

  170. I have finished V1.1 of the pong clock PCB, correcting errors.

    I have added a FTDI header for uploading sketches and put a jumper on to select what RTC your using.

    I have also moved to DHT to D7, so to free up D8 for a PIR sensor, but I have not added a specific section for a PIR module.

    • Have finished putting details of my code on a fork off Nick’s GITHUB page.
      My details are here https://github.com/brettoliver/pongclock
      My version adds temperature to the slide display and also a timer to the standard mode.
      PIR control of display blanking is also included.
      As will as schematics there are loads of animations and videos as well as a link to my main pages as in anthonyjclarke’s post above.

      May help you decide what you want to add to your own versions of the clock.

      • Over the weekend I got one of the Pong Clock PCB’s (Atmega328 not a nano PCB) soldered up, please to say all is work as it should. I haven’t tested with the DHT sensor as I don’t use one. Currently running with a DS3231SN RTC Chip.

        I find it best to upload a sketch to set time, remove RTC select jumper(so pong clock sketch doesn’t adjust time), upload pong clock sketch. then replace jumper!!

        In the next few days I will get a Nano PCB soldered.

      • Apologies for the delay. Both boards are working as expected. I have 9 of each, if anyone would like on please let me know.

      • I’ll take one of the working ones! Let me know if I can PayPal to your email and how much you want!

      • @anthonyjclarke I’ll send an invoice via PayPal due to the shipping, just looking up a price but expecting it to be around 50 AUD for one of each PCB plus international tracked shipping.

        @Nick I’m looking for £10 per board, that is including UK 1st postage. Paypal is good for me gazman (at) gazman321 (dot) co (dot) uk what board was you after, I have a choice of either Pong Clock v1.1 (uses a standalone atmega328) or the Pong Clock Nano (uses a arduino nano).

  171. Hi there, thanks for the awesome Arduino Project. I am in the build and struggeling since a couple of days.
    All my letters are written from right to left and mirrored. :O

    Anybody have any idea to fix that? I am using the exact same code as posted in the project. Using two separate devices HT1632c Matrix displays like these:
    https://tinkersphere.com/led-matrix-panels/2197-16×24-red-led-matrix-panel-chainable-ht1632c-driver.html

    Thanks in advance :)

  172. I made the clock and they works great.
    But sometimes one of the displays goes out or flashes.
    What could be the problem?

    • Great you made it! Most likely the power to the display is not connected securely, check all your connections to the displays and make sure they are soldered okay.

  173. I have a DS3231 and a 8×32 dot matrix display module. Is it possible to make this clock with these parts instead?
    Thanks in advance.

  174. Hey Nick

    So I am doing a school project and making your pong clock. Although I live abroad and I have a couple of questions about some of the materials.
    I was wondering if the pong clock set up will work with a MAX7219 matrix module type. in your description, it says we need a 2416 LED Matrix.

    If you can help that would be awesome. Thanks so much

  175. Hey, Me again.

    Is it possible for you to help me find the code for this product? I can not find it on your website (if you have it)
    If you do it would be great if you don’t mind sharing.

    Thanks so much:)

    • Sorry I don’t have code. It would take quite a lot to write it to work with the clock. You are best to stick with what works

      • Ok
        Sorry, but do you mind explaining to me what works or do you have the code on your website?. I am a little confused.

        Thank you so much for all the help so far.
        Nico

      • Hey, you would need to buy the bits in the instructions I wrote. Read them through and it should make sense.

        If you read to the end you will find a link to the code too

  176. Hey Nick,

    I am trying to make a pong clock for my design class in school but I cannot get the Sure Electronics 2416 LED Matrix panels (24×16 pixels) in Red or Green version HT1632C chip. Do you know any way I can still make the pong clock without the matrix panels? Is there anything that could replace it.

    Thank you,
    Nam

  177. Hay Nick, Thanks so much. I was able to find the code and set up. The clock is coming on great.

    Thanks for all your help

    Nico

  178. Just to let you know I made this with some slight modifications. I added an additional 7 segment display as well. I too had difficulty getting the LED panels but eventually some turned up on ebay.

      • Thanks! BTW the modules seem to be only available on Sure Electronics webstore now but I’ve been keeping an eye on ebay as I may make another for a friend. This time on a proper PCB not prototyping board. The shift register wiring was a nightmare although I could just skip that modification I made.

      • There was a guy who made a pcb for this (missing your extras of course) he might be able to send you one. His details are in the comments.

      • I may do that if I can get the modules. BTW I noticed an issue with the word clock mode. In certain conditions the top line is blank. For example when displaying Twenty Seven or Twenty Eight the top line will be blank. It will display normally when Twenty Four is on the bottom line so it seems to be when there are 12 characters including spaces on one line.

      • Eek, never noticed that. I wonder what causes that. I will have to take a look when I get time

    • I do still have about 7 of each left, looking for £10 including shipping to UK. overseas shipping is extra. Thanks

      • I would like a couple of those PCB’s. You seem to say that there is more than one type. Please send me info and pricing to ship to US. Thanks!

      • Hi, yes, I have 2 types, one type is a standalone ATmega chip the other is basically a add-on board for a arduino nano.

        Shipping to US is approx £12 that is for 5-7 working day tracked delivery.

        if you have any questions please email me gazman(at)gazman321(dot)co(dot)uk

        thanks

    • I’ll see if I can still obtain the parts to make another and if my family member wants it. If so then I will look at purchasing a PCB. Thanks

  179. /Users/gazman321/Desktop/IMG_2293_zpso3fduwlz.jpg/Users/gazman321/Desktop/Screen Shot 2017-12-14 at 13.45.25_zpsszh4odqu.png

  180. Hi Nick. Brilliant bit of work. The amount of feedback you are still getting after all these years is credit in itself.
    I have built one using Sure displays and a custom PCB that does away with the Arduino (happy to send you one if any use to you? Just email your address and I’ll put one in the post). This works just fine. No issues at all.
    Decided to build one for my Brother as a Christmas present. I purchased four of the lower cost Chinese versions of the panels (primarily because there in no pcb at the bottom of the panel and makes the enclosure tidier).
    I found that the display was mirrored horizontally and corrected this with the line
    <> as suggested. This corrected that issue.
    Only problem now is that during the pong display, if the ball passes through the time or the tennis net the illuminated leds it passes through are not refreshed (ie left off) so as the game progresses the net and time slowly disappear until the minute rolls over when they get refreshed.
    It seems as if the image is not being stored for some reason.
    Wondered if you had any ideas?
    Many thanks.
    Kevin

    • Hey Kevin, thanks for the nice note. Great you like it! Did you make the PCB yourself?

      I’m guessing maybe something isn’t flipped along with the other tweak you made. I’ll try and take a look when I have a moment

  181. Hi Nick – just to confirm the line I added was <>
    I copied and pasted this previously and it disappeared in to neverland once posted!
    Kevin

  182. Hi Nick. I design PCBs as part of my work (railway stuff) and its simple for me to add a file to the bottom of something we are doing – it adds no cost and gets me a few for my own projects.
    Every job has a perk!
    Kevin

  183. Hi Nick, Anthony.
    Hopefully the links below will work.
    Nick – FYI The photo shows the issue with disappearing score and net. The net does not regenerate but the score does on minute change. The code I added to mirror the display is y = 15-y; (as suggested elsewhere).
    https://photos.app.goo.gl/J5nMpnyLXQLjYAqr7

    The PCB…
    https://photos.app.goo.gl/P2EmMAZtmfUP6f5d9
    Nick – happy to send to you FOC if you provide a delivery address.
    If anybody else wanted one I think I should set a minimum price so that I don’t get inundated with requests :-)
    If I did them at £6 then all ‘profit’ would go to cancer research (my preferred charity).
    Does that sound reasonable? I have about half a dozen, but could get more done.
    Not sure how anyone would pay though ?? Would need to get my email out there somehow?

  184. Hi Nick. just to let you know I posted some pics showing the disappearing score and the pcb but they are currently stuck awaiting moderation. Presumably because of the links to pics. In the meantime you asked what I added to mirror the display. y = 15-y; (as suggested elsewhere). This worked OK.
    Hopefully the other message will be released soon.
    Cheers
    Kevin

  185. Hi Nick,
    The comments I left with picture links in (were awaiting moderation) have disappeared altogether now, The links were to a public google photo album,
    Any suggestion how to get round this?
    Kevin

  186. Thanks Nick. didn’t realise you were the moderator! Don’t do a lot of this web stuff!! Electronics is my thing.
    As said if you can let me have a delivery point I’ll drop a PCB in the post.
    I presume you can email me?
    Kevin

  187. I built this clock years ago and love it. I was wondering if anyone has done an updated version with a nodemcu and rgb leds. Thanks

  188. Hi Nick,
    I going to build the pong clock.
    I have two led display’s with a h1632c chip but with no box header on it.
    See : https://nl.aliexpress.com/item/32712599985.html
    There are eight pins on the edge of the board,
    They are VCC, GND,DAT,#WR,#RD,#CS,OSC and SYN.
    Between these boards I connect VCC with VCC and so on.
    Is it possible to use these two display’s.
    And if it is true how do I connect the displays to my arduino mega..
    Regards,
    Mans

    • There looks to be an IDC connector on the back you can maybe use? You would need to find the pinout.

      Also be aware the leds may be wired up in a different order, so you might have to change the code in the sketch to handle that. Eg pixel 0,0 may not be top right.

      Easier if you can find the sure displays tbh.

    • Yes should work fine. You just need to check the pins assigned in the sketch and make sure they match the equivalent pins on the Mega

    • Yes I have Christophe!

      I’m happy to share a new link. My own clock works since… 2014!

      https://www.dropbox.com/s/bqj4b4d0ubl2abz/PongClock-v5.1FRrev3.zip?dl=0

      This the 5.1FRrev3 from 2020, different from the original published in 2014. I did several fixes and updates, especially putting strings and arrays in flash for saving memory and improving stability. Also, I’ve embed the original libraries into the project, as many of them are deprecated nowadays and required the code to be completely refactored. This is a standalone package now that has no more external dependencies.

      Take care:
      – pin assignment on lines 99-101
      – serial rate on line 203
      – special events lines 2371-2379

      Enjoy,
      Matock

      PS: I have in stock a pair of Sure DE-DP11211 panels. They are completely new, never used. This is the green 5mm model (24x16px). Send me a PM if you are interested.
      :=)

      • Hey matock, thank you very mutch for your sqetch en files…. How mutch you asking for the pair of panels? Let me know. thx

  189. Let say 25 EUR for the pair (+ post from Brussels). Is it ok for you?
    If you need details, photos, etc, maybe we can continue with PM matock(at)gmx(dot)com
    PS: en français aussi si ça va pour toi…

    • Hi Sammy,
      I don’t know the Adafruit panels. It is likely that they are not strictly identical to the Sure’s original and that the ht1632_plot() display function needs to be adapted. Maybe the coordinate origin (0,0) is not the same (bottom/left instead of top/left for example), or the sub-panels are not chained in the same order. You have to test this. For the flip it seems that X,Y coordinated are switched (see German post https://forum.arduino.cc/t/sure-electronics-ht1632-led-display-mit-adafruit-library/432670)
      Otherwise I still have 2 original Sure panels to sell, see above.
      Rgds

Leave a reply to Nick Cancel reply