Which Khadas SBC do you use?
vim3
Which system do you use? Android, Ubuntu, OOWOW or others?
ubuntu
Which version of system do you use? Khadas official images, self built images, or others?
offical
Post a console log of your issue below:
here is the program:
import wiringpi as GPIO
INPUTDO = 1
INPUTAO = 0
INPUTDO_PIN = 29
#INPUTAO_PIN = 30
pinstatus_list = ['waringing','normal']
GPIO.wiringPiSetup()
#GPIO.pinMode(INPUTAO_PIN, INPUTAO)
GPIO.pinMode(INPUTDO_PIN, INPUTDO)
print("test !")
GPIO.delay(1000)
while True:
resultDO = GPIO.digitalRead(INPUTDO_PIN)
#resultAO = GPIO.digitalRead(INPUTAO_PIN)
GPIO.delay(50)
print('{}{}'.format('the tempDO of scaner is:', pinstatus_list[resultDO]))
GPIO.delay(50)
#print('{}{}'.format('the tempAO of scaner is:',resultAO))
GPIO.delay(100)
when detecting gas the sensor output low level
**Delete this line and post your log here.**
```in geany:
test !
the tempDO of scaner is:waringing
the tempDO of scaner is:waringing
the tempDO of scaner is:waringing
the tempDO of scaner is:waringing
the tempDO of scaner is:waringing
in terminal:
root@Khadas:/home/khadas# gpio -g read 461
1
root@Khadas:/home/khadas# gpio -g read 461
0