11-26-2017, 06:41 PM
Edit (Thanks to Jamess):
An input pin reacts to either ground or +3.3V
Ground ==> False
+3.3V ==> True
Nothing ==> Either True or False (Undefined)
Original post:
Hey!
I am playing around with the input mode on the Asus Tinker, and one of my pins is acting up, breaking my scripts.
Normally my pins react (True / False) when connected to ground or not, this pin I am talking about suddenly does the mentioned when connected to +3.3V instead.
The pin is always outputting False while the others are outputting True, giving a True when connected to +3.3V, while the others gives a False when connected to ground.
None of the mentioned pins are bent, and nothing is connected to them.
Programming language used is Python 2
This is the following code I am running, and "166" is the pin which is acting up. You can see the pin in the image below:
![[Image: IGcWk2r.png]](https://i.imgur.com/IGcWk2r.png)
I'm really unsure about this behavior and have been debugging for hours. Can someone point me in the right direction?
With kind regards,
Frekvens1
An input pin reacts to either ground or +3.3V
Ground ==> False
+3.3V ==> True
Nothing ==> Either True or False (Undefined)
Original post:
Hey!
I am playing around with the input mode on the Asus Tinker, and one of my pins is acting up, breaking my scripts.
Normally my pins react (True / False) when connected to ground or not, this pin I am talking about suddenly does the mentioned when connected to +3.3V instead.
The pin is always outputting False while the others are outputting True, giving a True when connected to +3.3V, while the others gives a False when connected to ground.
None of the mentioned pins are bent, and nothing is connected to them.
Programming language used is Python 2
Code:
import ASUS.GPIO as GPIO
GPIO.setwarning(False)
GPIO.setmode(GPIO.ASUS)
GPIO.setup(166, GPIO.IN)
print( str( GPIO.input(166) ) )
GPIO.cleanup()This is the following code I am running, and "166" is the pin which is acting up. You can see the pin in the image below:
![[Image: IGcWk2r.png]](https://i.imgur.com/IGcWk2r.png)
I'm really unsure about this behavior and have been debugging for hours. Can someone point me in the right direction?
With kind regards,
Frekvens1