This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from win10toast import ToastNotifier | |
from ping3 import ping | |
import time | |
import os | |
#Defining variables | |
device_ip_address = "192.168.0.101" #IP address of the device to be pinged | |
notification_delay = 120.0 #Frequency of the offline notification in seconds | |
loop_delay = 1.0 #Frequency of device status chekcing in seconds | |
was_offline = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
import time | |
import urllib.request | |
#Defining variables | |
buzzer_pin = 23 | |
def setup(): | |
GPIO.setmode(GPIO.BCM) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import firebase_admin | |
from firebase_admin import credentials | |
from firebase_admin import firestore | |
import csv | |
#Initializing firebase | |
cred = credentials.Certificate("path/to/serviceAccount.json") | |
firebase_admin.initialize_app(cred) | |
db = firestore.client() |