iomari Posted September 25, 2019 Posted September 25, 2019 Greetings, On the tinkerBoard, I'm using python. I having difficulty understanding why the functions don't return the values that is expected according tho the library help. I'm using python3 and the ASUS GPIO library. import ASUS.GPIO as GPIO GPIO.setmode(GPIO.BOARD) This is the output from ipython: In [18]: help(GPIO.gpio_function) Help on built-in function gpio_function in module ASUS.GPIO: gpio_function(...) Return the current GPIO function (IN, OUT, PWM, SERIAL, I2C, SPI) channel - either board pin number ,RK number or ASUS number depending on which mode is set. But when I try for instance: In [19]: GPIO.gpio_function(29) Out[19]: 1 AS you can see, the return value is '1' not (IN, OUT, PWM, SERIAL, I2C, SPI) Also if I run: In [20]: help(GPIO.getmode) Help on built-in function getmode in module ASUS.GPIO: getmode(...) Get numbering mode used for channel numbers. Returns BOARD, RK, ASUS or UNKNOWN Then I run: In [21]: GPIO.getmode() Out[21]: 10 As you can see, I'm not getting a return of 'BOARD, RK, ASUS or UNKNOWN' but instead I'm getting 10. IS it me or are the outputs to these functions wrong? iomari
Recommended Posts