Da 4
Da 4
Sensors
• Motion sensor to detect person
• Wind sensor to detect Wind
• Wind detector for error Correction and knowing if there is wind or not
Setting up environment for wind speed
Code in SBC
from gpio import *
from time import *
def main():
while True:
if digitalRead(2) > 0 or digitalRead(1) == LOW :
customWrite(0,0)
else :
customWrite(0,2)
delay(500)
if __name__ == "__main__":
main()