gootoomoon / WiringCB-python

wiring-like lib for cubieboard ,port from WiringPi2-Python
33 stars 14 forks source link

Problem with GPIO #5

Open GeorgeJirka opened 6 years ago

GeorgeJirka commented 6 years ago

Hi.

I use your library to control my GPIO on cubieboard2. And I try blink with led on PIN 32 (PD0). But LED don' t blinking.

I download your library: https://github.com/gootoomoon/WiringCB-python/archive/master.zip And install: sudo python3 setup.py install # python 3.2.x

Any idea, wht is wrong?

`import wiringpi2 import time OUTPUT = 1 pin = 32 HIGH = 1 LOW = 0

wiringpi2.wiringPiSetupPhys() # init pin to phy mode,U14(1~48) U15(49~96) wiringpi2.pinMode(pin,OUTPUT) # set pin 2 to output mode

while 1: wiringpi2.digitalWrite(pin,HIGH) # Write HIGH to pin 2(U14 pin 2) time.sleep(1) wiringpi2.digitalWrite(pin,LOW) # Write LOW to pin time.sleep(1) `

GeorgeJirka commented 6 years ago

Ok. Problem was found.

Pin 32 - PD0 is pin = 1.