I can't solve this, I'm banging my head on the wall since a week.
I simply can't get GPIO doing ANYTHING.
I tried to read an input (pin 22), I get nothing at all.
I tried to blink a led, same pin again - I get nothing. I can't even measure any voltage on that pin, so it seem dead.
My system is raspbian Jessie: Linux raspberrypi 4.4.11+ #888 Mon May 23 20:02:58 BST 2016 armv6l GNU/Linux
This is about Python and GPIO I'm using:
Code: Select all
root@raspberrypi:~# python
Python 2.7.9 (default, Mar 8 2015, 00:52:26)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import RPi.GPIO as GPIO
>>> import RPi.GPIO as GPIO
>>> GPIO.VERSION
'0.6.2'
>>>
root@raspberrypi:~#
Led blink:
Code: Select all
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setup(22, GPIO.OUT)
for i in range(50):
GPIO.output(22, True)
time.sleep(1)
GPIO.output(22, False)
time.sleep(1)
GPIO.cleanup()
Reading of GPIO 22 as input:
Code: Select all
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(22, GPIO.IN)
a=GPIO.input(22)
while True:
print "This is what I read on pin 22: ",a
time.sleep(0.1)
Any help?
TY all
