Hardware Reference
In-Depth Information
count = 0
if mail>0: #print for new emails
print(mail)
print("new emails \n")
while count<10:
count += 1
gpio.output(17,gpio.HIGH) #blink LED if there are new
emails
time.sleep(1)
gpio.output(17,gpio.LOW)
time.sleep(1)
gpio.output(17,gpio.LOW) #set LED to low
else:
time.sleep(10) #repeat cycle for 10 seconds
3.
The LED needs to be connected as shown in the following diagram:
Raspberry Pi email notifier - Schematic created with Fritzing, Raspberry Pi Library
 
Search WWH ::




Custom Search