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
# External module imp | |
import RPi.GPIO as GPIO | |
import datetime | |
import time | |
init = False | |
GPIO.setmode(GPIO.BOARD) # Broadcom pin-numbering scheme | |
def get_last_watered(): |
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 water | |
if __name__ == "__main__": | |
water.auto_water() |
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
<!DOCTYPE html> | |
<head> | |
<title>{{ title }}</title> | |
</head> | |
<body> | |
<h1>PLANT HELPLINE</h1> | |
<h2>The date and time on the server is: {{ time }}</h2> | |
<h2> {{ text }} </h2> | |
<a href="/auto/water/ON"><button>Turn ON Auto Watering</button></a> |