For anyone new to Teensy, you may have only been exposed to the newer boards (currently Teensy 3.5 and Teensy 3.6). If you take a look at the Teensy pinout for the 3.5 and 3.6 boards, the pin count seems very odd. Starting from ground you have pin zero up to pin 12, a 3.3v out and then the pins start at 24 but 13 is on the other side. So, what’s the deal, why are the pin numbers so oddly placed?
If you know me, you know I’m a huge fan of Teensy, I’ve been using them since Teensy 3.1. Back before the 3.5 and 3.6 series Teensy boards, the boards were smaller and the outer pins only went up to 23. They started at zero and counted up to 12, then transferred to the other side and continued from 13 to 23. There are even more pins on the back but that’s a topic for another post.
After introducing a new Teensy with even more pins, Paul (The creator of Teensy) and his team had the good idea of keeping the pin footprint the same for that left most portion of the board. Now, if you have a project that you previously used a Teensy 3.1 or 3.2 for, provided you have room for the bigger board it’s a straight swap for the new longer boards. No need to adjust your pin assignments or wires which sure, might make it a little confusing for those not familiar with the older boards but makes it so much easier for others already using the older boards. Also, some companies have developed shields for the Teensy based on the form factor of the 3.1/3.2 which wouldn’t work on 3.5/3.6 if the pin footprint changed. Just a quick plug here, there is a really cool OLED display called TeensyView from Sparkfun that you can solder right to the top of your Teensy to display information. Anyone who knows me knows I always recommend you incorporate some means of getting feedback from your board without having to connect it to a computer. Because the Teensy pin footprint is the same between boards, even though this was developed for the 3.2, it works on the 3.5 and 3.6 as well.
So, as you can see above, all of the pin assignments are same from 0 to 23 to maintain backward compatibility for the new Teensy board. The new board even adds a little more functionality to those pins previously on the 3.2 by providing a few more PWM pins. Hopefully this helps some people new to Teensy, understand why the pin numbers are a bit wacky.