Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created February 23, 2018 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/cdf1cc5aa529e53d3a09027f2d4b1ffb to your computer and use it in GitHub Desktop.
Save Fhernd/cdf1cc5aa529e53d3a09027f2d4b1ffb to your computer and use it in GitHub Desktop.
Leer datos provenientes del bus GPIO de una Raspberry Pi.
import RPi.GPIO as GPIO
GPIO.setup(1, GPIO.IN)
if GPIO.input(1):
print('Nivel de entrada HIGH')
else:
print('Nivel de entrada LOW')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment