https://github.com/onnesok/check_internet_connection
check if internet is available or not
https://github.com/onnesok/check_internet_connection
python raspberry-pi
Last synced: 3 months ago
JSON representation
check if internet is available or not
- Host: GitHub
- URL: https://github.com/onnesok/check_internet_connection
- Owner: Onnesok
- Created: 2022-05-22T18:23:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-27T09:41:22.000Z (about 3 years ago)
- Last Synced: 2025-01-05T00:44:47.783Z (5 months ago)
- Topics: python, raspberry-pi
- Language: Python
- Homepage:
- Size: 210 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# check_internet_connection using raspberry pi 4
[](LICENSE)

## Details
This script will check if we get a response from google or not and from that we can determine if our internet connection is available or not. By checking our connection we can use it with other scripts and logics to do some interesting things.
For example in this script if we are not connected to internet then we will turn on a led; else we won't. If we lose connection even once we'll light up led even after restoring connection. By this way we can determine if our internet was ever lost while this script was running.
## clone repo
```bash
git clone https://github.com/Onnesok/check_internet_connection
```## Instruction
First check if ```python-rpi.gpio``` is installed or not. so, for that open your terminal and write:
```bash
pip install RPi.GPIO
```
Now connect led positive part to raspberry pi ```GPIO pin 18``` and ```negative to ground.``` you're done....
After that you're good to run the script.
To run it open your terminal and write.```bash
cd check_internet_connection
sudo python3 internet_connection_checker.py
```