School Bus Countdown
"I missed the bus!" - Four words that no parent ever wants to hear from a child. So why not make a countdown clock for them?
"I missed the bus!" - Four words that no parent ever wants to hear from a child.
I ended up being the parent at home for most of the "we need to get to the bus" days with our new kindergartener. He was the first of the kids to take the bus at such an early age. I think part of my stress was around the fact that I didn't want him to miss the bus, but part was also what I would do if he did. In our school district, the younger kids go to school earlier in the day than the older kids, so he was the first one out with three more behind him. Packing everyone up to drive to school would pose a challenge for me.
Necessity is the mother of invention
- Author Unknown
I was pretty sure I could come up with some solution to this problem, or at least something fun to work on. I abandoned an older idea of creating an alarm clock for younger children and always regretted not completing that project. This time around, I have a bit of experience "making" things with Raspberry PI and ESP8266 micro-controllers. The devices themselves are very inexpensive, if you know what you need.
I have had some starts and stops with working on micro-controllers in the past. Most recently I had created a small remote control using an ESP8266 w/WiFi and some arcade buttons to increment a swim meet sign (more on that project later!). So I knew some of what I needed to do for this project.
I ordered some materials from aliexpress.com. They carry the Wemos devices and lots of add-ons for the boards. I ended up with some WEMOS Mini D1 Lite w/ WiFi for $3/each and some 0.66" OLED 64x48 Shields for $4/each. That's not bad, $7 for a small micro-controller and a screen that can mount right on top of it.
I soldered some stacking headers on the WEMOS D1 and pins on the OLED Shield, from there, they stack on top of each other plug-and-play style.
After learning a bit from others that have come before me, I took some examples from the Adafruit SSD1306 Library and got started (https://github.com/adafruit/Adafruit_SSD1306) with some basic tests. After verifying the board and shield work, I set in to write some code in Arduino IDE.
My pseudo code is really quite basic:
- Boot the board and connect to WiFi
- Sync time with an NTP client
- If the day is Monday - Friday and the time is ~2 hours prior to when we need to leave for the bus, display the time left until we have to leave
- If the day is Wednesday, move the time to leave back by 1 hour to account for the late start day
That's really all there is to it. Version 1.0 was just the WEMOS and OLED plugged into a USB cable for power. I plugged it in every morning (or my 5yo did) and he could track how much time he had left before he had to leave.
Success! It really is nice for a parent to have something very cut and dry to show the kids when it comes to time and tasks. In this case, our son can look at the sign and know he has over an hour before leaving, or he can see that he only has 8 minutes and needs to get a move on! No more "please hurry! you are going to be late" conversations in the house.
Version 1.1 is the same, only taped up to a wall plug to make it more "permanent" in the location. That required me updating the code a bit to clear the display after the time was up and on weekend, so as to not burn-in the screen.
My next big leap will be Version 2.0. This will include a larger screen that can be seen from across the kitchen and with color! This opens up some cool possibilities for changing the color of the background as it gets closer to leave time. It can also display images, so maybe having a cool picture of a bus would be neat. If that works, I would like to print out a 3D printed mount for the screen and controller in the shape of a school bus. I am currently working out some issues with my proto-type for the screen from Adafruit. https://www.adafruit.com/product/4311.
Plans for Version 2.1 include displaying the time on the screen most of the time (maybe until 10PM or so) making it more useful as a general object in the kitchen.
If you wanted to work on this project yourself, here are some parts you could source to get started:
- A couple of WEMOS D1 Mini Pro with WiFi for ~$10 ($5 each) https://amzn.to/2ShhNUn or if you want the stacking headers, this one comes with: https://amzn.to/2Sj9zLw
- The OLED Shield to mount on top of the D1 Mini: https://amzn.to/3bcNiYL
If you are more of a fan of Adafruit hardware you could do this assembled Feather Huzzah with stacking headers already on it: https://amzn.to/39acZHz and then add the Adafruit Featherwing OLED display on top: https://amzn.to/36W0U72. That display is of slightly different size, 128 x 32 instead of 64x48 like the WEMOS OLED, however you can probably make good use of the larger size to arrange the time display. The Featherwing also has 3 buttons built-in to it, so you could use them to implement a "demo" mode that would show the count-down in-progress.
NOTE: The code would need modifications to fit the Featherwing screen. This isn't hard to do, but may take some trial-and-error on your part to line up where you want the digits to display.
You could also get them direct from Adafruit and assembled if you want to get started quickly!
DISCLAIMER: The pages on my site may contain affiliate links, which means that if you click on one of the product links, I’ll receive a small commission that helps keep this site running.