unconsciously maybe I was inspired by the IT CROWD and their Internet box 🤣
requirements:
- Tea 🍵
- raspberry pi zero w, with its power adapter and cable
- MicroSD card 64GB (Just to be Comfy for future updates)
- 2x Resistors, 220 OHM
- 1x Green LED
- 1X Red LED
- Soldering Wire
- Soldering Iron
- Power Drill
- Few M3 Screws from different sizes to hold it in place
- 3D Printer, or print online the model that goes accordingly: https://www.thingiverse.com/thing:2407893
Download the RPI Manager: https://www.raspberrypi.com/software/
- Settings (Change Accordingly):
Save
Yes
then Flash the Drive, this can take sometime, Then first boot will also take the longest. Tea Refill.
Once loaded the OS. SFTP, SSH and Python3 access should be Enabled, go in your router and you will see its IP address.
- Install the below, this takes about 10 minutes for the first time, then from there it takes about 5.
sudo apt update
sudo apt install python3-gpiozero
sudo apt-get install python3-pip -y
sudo apt install python-gpiozero-doc -y
Potential Error when doing update: "apt-key deprecation warning when updating system: "Key is stored in legacy trusted.gpg keyring""
then do this:
cd /etc/apt
sudo cp trusted.gpg trusted.gpg.d
then
sudo apt upgrade -y
sudo rpi-update
sudo reboot
From what I used two GPIO 17
& 27
, plust two Grounds. (See below):
This is a sample Diagram on how this needs to be soldered:
https://gpiozero.readthedocs.io/en/latest/recipes.html#led-with-variable-brightness
In this same repo, I'm sharing the python file, where you need to make changes to your Internal and External host to ping acccoringly.
nano main.py
, CTRL + X
, to save the file
Add the context, then run the file with this.
python3 main.py
Now this saves me trips to the Router or Modem, and I have it powered by a small power bank since this is a such low voltage.
what else can I use it for, hmm:
- technically, People that do not how to read the LEDs on a switch + Modem
- Monitor my own site(s). (after all you have many combination of colors)
- it could be mobile too, as long as I can Add a VPN
- I can automate it so it starts as a service, and completely Automated
- notification for new products if I was to add a scraper..... list can go on an on.