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 publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards
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.
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.