Guest User

Untitled

a guest
Jan 17th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. import RPi.GPIO as gpio
  2.  
  3. gpio.setmode(gpio.BOARD)
  4.  
  5. gpio.setup(36, gpio.IN)
  6.  
  7.  
  8. Objetos=0
  9.  
  10. while True:
  11.  
  12. sensor = gpio.input(36)
  13. if sensor == 0:
  14. Objetos+=1
  15. print("Objetos Detectados", Objetos)
Add Comment
Please, Sign In to add comment