Close

Electric Imp Code Posted

A project log for Tennis Court Status Updater

Tennis court staff flip a switch on a small box and an update is posted to a web page for players to check before they call or leave home.

don-gettnerDon Gettner 08/20/2014 at 15:060 Comments

8-20-14 Posted the Electric Imp Agent and Device code to the support page for this project. Like all code it will be tweaked and modified over the next few weeks, but this version works so feel free to take a look.

I realized the existing code will keep the RGB LED on 24/7 even though the tennis courts are not open all of the time. This has to be fixed. There are several options. Could have a hardware On-Off switch so the staff can turn it on in the morning when they arrive and turn it off when they leave, but one main feature of this design is that the staff doesn't have to do much so I doubt I'll do this. Could have a photodetector to turn off the unit when it is dark, but this would need a way to set the threshold and some rooms are never completely dark so this might be a problem.  The electric imp knows what time it is (or can find it out easily) so I will probably add an option to set the starting time and ending time on the web page and then use those times to control the RGB LED. We can have default values of 6:00 AM and 10:PM (we have lights on the courts and this probably is common) which probably would work for most. Not sure how to do this in the code but that is how this project has developed; find something I want to add and then figure out how to do it.

Discussions