Jump to content

Recommended Posts

Posted

better use this https://github.com/duxingkei33/orangepi_PC_gpio_pyH3.git

then look the file <source>/pyA20/gpio/mapping.h

 

// {   "PA6",  SUNXI_GPA(6),  7   },

// connect PA6 and GND

#!/usr/bin/env python
import os,sys
if not os.getegid() == 0:
 sys.exit()
from pyA20.gpio import gpio,connector,port
gpio.init()
gpio.setcfg(port.PA6, gpio.INPUT)
gpio.pullup(port.PA6, gpio.PULLUP)
state=gpio.input(port.PA6)
print state

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

Important Information

Terms of Use - Privacy Policy - Guidelines