Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions GroveWeatherPi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,21 @@ def checkForButtons():

while True:

# Check for new day to do some daily maintanance.
# For now, just reset the daily rainfall count. More might come...
today = datetime.now().day
if 'yesterday' in locals(): # Not the first run
if today != yesterday: # A new day has begun
# Reset daily rain count
print "Reset rain count"
totalRain = 0
yesterday = today
else: # First run, define yesterday
print "First run, define yesterday/initialize variables..."
yesterday = today
totalRain = 0
# New day can start...

# process Interrupts from Lightning

if (as3935Interrupt == True):
Expand Down