Using Arduino as a Sports Score Ticker to get Live Cricket Results

An Arduino with Ethernet shield can be configured as an Ethernet client to fetch live sports scores from the Internet. The scores can the be displayed on any display device connected to the Arduino or sent through the serial port.




In the Arduino live cricket score project, the Arduino fetches the live cricket scores from cricbuzz.com and displays them in the Arduino IDE serial monitor window. It gets the scores by accessing the XML scores feed and then extracting the desired information from the XML file.

Arduino cricket score ticker

Arduino Cricket Score Ticker

This is a very early version of cricket score code and will be improved on in the future. The code is susceptible to breaking if there are any unexpected changes to the XML file, but the code will be made more robust and will be updated to handle and recover from errors in the future.

Go to the Arduino live cricket score project →

16 thoughts on “Using Arduino as a Sports Score Ticker to get Live Cricket Results

  1. Brilliant, I had it loaded and running in about 10 seconds I think.
    I am going to have to study this closely, it is not at all how I was attempting to do it. I got into a mess with the arduinojson library and YQL.
    Thanks again, I hope to decipher fully how this works

    cheers John

    • I’m thinking of saving the XML file to SD card for a future version, then the various fields in the file can be randomly accessed. This should overcome the memory limitations of the Arduino.

      • I think that is a good idea. I am struggling to find a way to select the required data and send to an LCD in a formatted way.

        Cheers
        John

          • Hi John
            I see that the code already had a problem yesterday when it encountered something unexpected. It actually displayed the results of the ENG NZ game after an AUS game. Once of the fields must have been missing in the first game, so it got them from the second game. I am working on capturing the XML file to SD and then parsing the file instead of doing it on-the-fly.
            Which Arduino are you using? What picture are you trying to display?

  2. Hi
    I was just trying to show you a pic of the 20×4 lcd in operation.
    I have modified the code a little so it only displays a selected game. I haven’t seen any errors so far doing it that way.
    I am using a Freetronics EtherTen which is just a uno clone with built in Ethernet.
    I might try using an ESP8266 to make a wireless version
    Thanks for the great work, I would never have worked it out.
    Look forward to further developments like using the sd card. That could give great flexibility to display and interact with the string as int’s or floats etc

    • Hi John
      I have made good progress on the SD card version of the code. I am watching the live score of the ENG / NZ game as I type this.

      The code needs a few further refinements and testing and then I will publish it. I will drop a note here to you when it is ready.

      Have you developed your own code further?

      • Great stuff, I look forward to it.
        I haven’t done much more, too much real work here getting in the way of fun.
        I do have a nice version running on a 20 x 4 LCD with game select option. I am working on wireless, and also converting some of the info from string to int so I can create alerts etc when a wicket falls (compare old number with new) and when all out etc. Also want to be able to easily change the layout to better suit the different information useful when watching a one day game or a test (req run rate etc)
        I think either the SD version is needed or much more memory

        Cheers

        • I have found that with the Arduino Uno, memory is used up very quickly as soon as a few libraries are used. I am actually doing the development work on a MEGA at the moment so that I do not run into memory problems and then don’t know whether unexpected behavior is from a bug in the program or a memory problem. I will test the final code on an Uno.

        • Hi John
          I have been testing my code over the past few days and it seems to be reliable. The bad news is that it won’t fit into the Arduino Uno memory, it will need a MEGA.

          I have written two articles related to this project.

          1) Saving a web file to the Arduino SD card for getting the XML live score data file: http://startingelectronics.org/software/arduino/save-web-file-to-SD-card/

          2) A post on this blog that looks at the how much memory various sketches take up to give some idea of how much memory an Arduino Uno has in terms of sketch size: http://blog.startingelectronics.com/a-comparison-of-arduino-sketch-sizes-in-memory/

          The memory article should give you some idea of why a MEGA is needed. I ran out of memory on the Uno for this project without even using a LCD display. From the article you will see that the simple WebClient Arduino code example uses one third of the Uno’s RAM and 45% of available Flash memory — and that is just a simple demo example that does not process the web file that it fetches.

          I should get the new cricket score ticker code and article published this week, so look out for it. I will also drop you a note here when it is done.

  3. To be honest, it’s not really my idea. A beer company here made a very basic version as a promotional gimmick a few years ago. I just wanted to make a useful version.

  4. I have fixed my compile problem with an update to the IDE to 1.6.5
    Now I have been experimenting with the code (not SD) loaded directly to a cheap ESP8266
    It fits easily, and runs very well Wireless!
    I can’t get an LCD working yet, not sure why, the docs say it should.
    I will post an update if I get it working

Leave a Reply

Your email address will not be published. Required fields are marked *