Hi, new guy here with a Teensy 3.2 board
I'm using the media buttons example (in: File - Example - teensy - USB_keyboard). I've simplified the code for my use which is only the first three buttons.
After making sure the sketch works for my project (controlling my music on my android phone via USB OTG hub) I realize that i cannot fit extra buttons in my small enclosure due to assembly method. I thought: Why not use the touch pins? I've tried some innocent changes in the code and only met terrible failure lol.
Could i have some help changing the inputs from buttons to touchread? So far I know i need two pins for each buttons with a resistor between pins for the touch sensing. The online examples i can find about touchread functions are rarely about buttons and more about sliders and arrays and piano keys. I'd just like to be able to have 3 simple touch buttons. Is that possible for someone with a good logic and zero coding skills?
My only code modification to the example other than shortening it is giving it a stupid-high bounce value to prevent the phone from registering multiple keypresses (i had cheap sticky buttons lined up for this because they looked and felt smooth)
The board has nothing soldered to it yet and my only preference to used pins is the outside row of through holes (i'm bad at pad soldering so far but will try if i must use pin 25, 32 or 33 for some reason)
I attach the simplified code so you guys know what i'm trying to do. I can find the right resistor value on my own i think but the code part eludes me. How would you replace buttons with touch in this?
thanks in advance for any time spent on this.
I'm using the media buttons example (in: File - Example - teensy - USB_keyboard). I've simplified the code for my use which is only the first three buttons.
After making sure the sketch works for my project (controlling my music on my android phone via USB OTG hub) I realize that i cannot fit extra buttons in my small enclosure due to assembly method. I thought: Why not use the touch pins? I've tried some innocent changes in the code and only met terrible failure lol.
Could i have some help changing the inputs from buttons to touchread? So far I know i need two pins for each buttons with a resistor between pins for the touch sensing. The online examples i can find about touchread functions are rarely about buttons and more about sliders and arrays and piano keys. I'd just like to be able to have 3 simple touch buttons. Is that possible for someone with a good logic and zero coding skills?
My only code modification to the example other than shortening it is giving it a stupid-high bounce value to prevent the phone from registering multiple keypresses (i had cheap sticky buttons lined up for this because they looked and felt smooth)
The board has nothing soldered to it yet and my only preference to used pins is the outside row of through holes (i'm bad at pad soldering so far but will try if i must use pin 25, 32 or 33 for some reason)
I attach the simplified code so you guys know what i'm trying to do. I can find the right resistor value on my own i think but the code part eludes me. How would you replace buttons with touch in this?
thanks in advance for any time spent on this.