[tool] adc io

This commit is contained in:
IrvingGao 2024-06-25 23:08:24 +08:00
parent 41bf558654
commit d95885295b
1 changed files with 15 additions and 0 deletions

15
tools/orangepi_adc_io.py Normal file
View File

@ -0,0 +1,15 @@
from takway.board import OrangePi
import time
import wiringpi
from wiringpi import GPIO
if __name__ == '__main__':
ADC_Pin = 6
wiringpi.pinMode(ADC_Pin, GPIO.INPUT)
while True:
print(wiringpi.digitalRead(ADC_Pin))
time.sleep(0.1)