Skip to content

Onnesok/check_internet_connection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

check_internet_connection using raspberry pi 4

License Badge Compatibility Modified

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

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:

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.

cd check_internet_connection
sudo python3 internet_connection_checker.py

Avatar

About

check if internet is available or not

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages