Teens 3.2 - Strange behavior on pin 14?

Status
Not open for further replies.

wavemachine

New member
Teensy 3.2 - Strange behavior on pin 14?

Hi all, I have searched around for a rather specific answer and drawn a blank. I'm working on a simple mod for a HOTAS stick set-up to extend the number of buttons and axes. I'm using a Teensy 3.2. Using a lightly modifed version of the joystick example code (complete - 16 buttons/6 axes), I found that button 14 was 'sticking'. Assuming it was my wiring, I changed the switches 3 times and made absolutely sure there was clearance for the buttons and that nothing was pressing them down. Then eventually, I disconnected everything and saw that windows was still showing button 14 in a down state. I figuered the board was damaged somehow (been used for other projects a few times) and so I ordered another one. The board arrived today and I tested the same code and strangely, the previously unused board was showing the same behavior. Does anybody else see this on theirs? Is there a solution?

Any help would be greatly appreciated.

Cheers
 
Last edited:
Thanks for the quick reply! The code is from the example (complete joystick) which has all pins pulled up internally. The test I did on the brand new board this morning is the un-edited version of the example.
 
Are you using 5v logic any where? A10-A14 are NOT 5v tolerant on the T3.2

A10-A14 are analog-only (not gray on card), so i don't think INPUT_PULLUP has any affect. A14 reads 0 even with INPUT_PULLUP. maybe use other digital pins on backside of T3.2

EDIT: never mind, you were properly using 14 not A14

though pin 14 is A0, so you may have conflicts with digital 14 and 15 (A0 and A1). The Complete sketch should have
const int numButtons = 14;
Comments in sketch warn about digital/analog conflict ...
 
Last edited:
I see a 1 on pin 13 (numbers start from 0) I expect it might be related to the LED on that pin

yes, pin 13 may be a problem as a button pin. with INPUT_PULLUP on 13, my T3.2 pin 13 sometimes reads as 0 because the resistor/LED makes it a voltage divider. I see only 1.7v on pin 13 with INPUT_PULLUP, that is close to the HIGH/LOW threshold.
 
Are you using 5v logic any where? A10-A14 are NOT 5v tolerant on the T3.2

A10-A14 are analog-only (not gray on card), so i don't think INPUT_PULLUP has any affect. A14 reads 0 even with INPUT_PULLUP. maybe use other digital pins on backside of T3.2

EDIT: never mind, you were properly using 14 not A14

though pin 14 is A0, so you may have conflicts with digital 14 and 15 (A0 and A1). The Complete sketch should have
const int numButtons = 14;
Comments in sketch warn about digital/analog conflict ...

I thought this, so I changed the analog ins to read pins 4-9 to avoid this conflict. Pin 14 still lit (on a naked board)
 
Looks like I need to skip 13/14 button reads then and make use of the rear digital pins.

Thanks to veryone - great forum! :cool:
 
Status
Not open for further replies.
Back
Top