It is a pretty commonly uttered question (sometimes loudly) around the home or office; “Is the internet up?” As the goto IT Support Manager around the house this can get a little tiresome. Most of the time the internet is up and it’s a user or personal device problem that can be solved with a re-boot, re-load, re-etc. Sometimes the internet is really down requiring a router and cable modem reboot or a call to the ISP. Wouldn’t a simple visual check that anyone could quickly understand be helpful? Plus, as a bonus, provide some general network health statistics with a screen print and an hourly update to a Google Drive spreadsheet.
This project is amazingly useful and incredibly simple to duplicate. If you already have a Raspberry PI it is very cheap to implement.
What it does and how it works:
The Raspberry PI runs a Python program that test pings 10 internet sites that you to determine to provide the status of your internet connection.
GREEN: 7 or more sites return a successful ping.
Green LED on. Updates the stats.
YELLOW: 6 to 4 sites return a successful ping.
Yellow LED on. Updates the stats.
RED: 3 or fewer sites return a successful ping.
Red LED on. Updates the stats.
To make the program run faster and not burden the network with outgoing pings, all 10 sites are not pinged on each run. The ping test rotates through the 10 sites. If the selected site does fail the ping test, the program goes into “Deep Probe” and checks all 10 sites to determine the connection status. “Deep Probe” runs are tracked for the status report that prints to the screen.
Each hour a status report is appended to a Google Drive spreadsheet via the Maker channel at IFTTT.Com.
For a visual output we went with a device that anyone can identify with, a simple $8 toy traffic light from Amazon. For $8 you get a lot. The light is well build, looks great, and is a full 7″ tall with three LEDs already installed. It also comes with 12 little toy cars that you can give away; you don’t need those. Next remove the four screws at the bottom of the base. You are going to see four wires that lead up to the three LEDs in the traffic light. Cut those wires and free them from the little ON/OFF switch and microcontroller that was meant to control the blink patterns for the non-hacker. Now you should only be left with four wires. The LEDs are wired common athode (+). The simple schematic below shows the hookup for each LED and their connection to the Raspberry PI. Double check the wiring for your traffic light with a button cell battery to see what wire lights each LED.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!
Adafruit has had paid day off for voting for our team for years, if you need help getting that going for your organization, let us know – we can share how and why we did this as well as the good results. Here are some resources for voting by mail, voting in person, and some NY resources for our NY based teams as well. If there are additional resources to add, please let us know – adafruit.com/vote
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.