Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • This is great information...I'm just confused as using it exactly as shown displays nothing when I press any of my buttons... Commented Nov 4, 2015 at 18:13
  • For the moment, adjust the pin numbers in the enum { sw0=8, sw1=9, sw2=10, sw3=11} line, eg change to sw0=3, sw1=4, sw2=5, sw3=6 to test the buttons on pins 3, 4, 5, 6. I don't have a teensy. For the longer run, if your buttons are on "pins 1-8" make 8 entries in buttons with the swiNum values from 1 to 8, and set nSwitch to 8. Note, since pin 1 is TX1, having a button on it may conflict with Serial. Commented Nov 4, 2015 at 19:11
  • Aye I've set to try different pins even to get 4 work and nothing shows. I attached some other switches I know work in case and still nothing. I'm generally keeping the buttons' common wire on gnd but I've tried changing that around too with no avail Commented Nov 4, 2015 at 19:26
  • If it helps to see, here's a pic of my current simple wiring to test buttons on 3,4,5,6: tinyurl.com/px6rezv and here's the button set I'll eventually use (all have been tested working individually with my first bit of code) tinyurl.com/oajbpck Commented Nov 4, 2015 at 19:44
  • I should have mentioned I'm testing in notepad, not console. An update, I swapped all the serial commands for a simple Keyboard.write(action); which now prints Aa, Bb, etc... I think I follow this now, standby~ Commented Nov 4, 2015 at 20:04