Jump to content

Orange Pi Zero gpio not working


Cloud Peng

Recommended Posts

kernel:  "Linux orangepizero 4.13.16-sunxi #20 SMP Fri Nov 24 19:50:07 CET 2017 armv7l armv7l armv7l GNU/Linux".

 

I have tried this document,
http://opi-gpio.readthedocs.io/en/latest/api-documentation.html#pull-up-pull-down-resistors


I am using pin 7 (GPIO 6) and INPUT mode, but it not working, 

however I got push signal, but I have not push it, why?

 

The following is my python code.

import OPi.GPIO as GPIO
import time

channel = 7
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.IN)


while True:
   time.sleep(0.5)
   print GPIO.input(channel)

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines