Tag: DIY

The Sports Clock – Update #2

I’ve started working on the software aspects of the sports clock. The code for the sports clock are in three parts:

  • iOS App
  • Spark Core code
  • Node.js Backend

To store the data for each clock, I’m using Parse (soon to be shutdown so I need to migrate the database when I have more time).

Screen Shot 2016-03-26 at 2.16.50 PM.png



The Node.js backend code listens for events emitted by the Spark Core. It then fetches from the database the MLB team that the user wants to get scores for. Then,  I use the MLB API to get the scores for any live games where the team is playing.

The MLB scores api is at http://gdx.mlb.com/. For every day, there is a file named masterscoreboard.json that contains all the games for the day.

For example, on March 26, 2016, the masterscoreboard.json would be located at


You can then search through the JSON file to find any relevant games. Each game contains a property called game_data_directory that has a path to files for the game. For example it could be something like: /components/game/mlb/year_2016/month_03/day_26/gid_2016_03_26_detmlb_phimlb_1. To get the data for that game, you can tack on gd2.mlb.com to the path so the url is like:


In this directory, you’ll find all kind of helpful files containing info about the game. Linescore.json (example shown below) was the best choice for me.

Screen Shot 2016-03-26 at 3.08.24 PM.png

I deployed the backend through Heroku.

For easy retrieving of MLB scores, I made my own npm package: mlb-scores. To install it, simply type:

npm install mlb-scores

Spark Core


To control the LED matrixes, I used the ledmatrix-max7219-max7221 for the spark core. I have a method called setScore() that is called by the server whenever the spark core asks for a score.

Since Heroku will auto sleep your code after a while, the spark core pings the server every few minutes to keep it awake. This is done through a Particle.publish() which is connected to a webhook.

Screen Shot 2016-03-26 at 3.05.39 PM.png

I used the ParticleDev app on OSX to upload and flash code to the Spark Core and used command line to view the serial messages from the Core. The default serial monitor in ParticleDev took 100% cpu power so I used the CLI instead.

The code is available at my Github: https://github.com/AndrewKe/SportsClockSparkCore

iOS App

I also built an iOS app that allows the user to change which team they want their spark core to be configured with. It uses cocoa pods to install dependencies for the Parse and Spark frameworks.

Screen Shot 2016-03-26 at 2.46.56 PM.png

Heres a screen shot of its current state:

Simulator Screen Shot Mar 26, 2016, 2.55.08 PM.png



Screen Shot 2016-03-26 at 3.08.24 PM.png

The PiDrone Update #2

I have now completed the new and redesigned laser-cut Acrylic Frame. The old frame was made of 1/8″ aluminum which made it quite indestructible, but also  caused interference with the flight controller avionics. Here are some of the improvements of the new design:

  • Mount for Pixhawk Safety Switch
  • Much, much more working space
  • Mounts for Raspberry Pi  and Pi Camera
  • Support for removable anti-vibration mount



Everything is held together with 4-40 screws, and 1″ 4-40 hex standoffs. The 4 aluminum booms purchased from HobbyKing are sandwiched between the two plates securely.The acrylic turned out to be much bendier than I initially believed, so the frame is “squishy” at some areas.

Download Ai Files: Quad Files


The PiDrone – Update #1

The PiDrone is a drone with a Raspberry Pi onboard that I hope to exhibit at Maker Faire Bay Area 2015.

My Goals for the Project Are:

  • Have the Pi and the Drone communicate through 3DR’s Drone Kit 
  • Have the Pi host a web based ground station
  • Create an iOS Ground Station for the drone

I already have a semi-working drone built up from last summer, but it will require extensive repairs and redesign.


© 2020 Andrew Ke

Theme by Anders NorenUp ↑