Need help using Teensy++

Status
Not open for further replies.

snowfun87

New member
I've been experimenting with Teensy 3.2 as a MIDI encoder, and delighted with results.

I would now like to try same with Teensy++ in order to have more digital inputs, but I'm a little confused by how the pins are labelled (C0, C1) etc. How are the pins identified when using functions such as pinMode?

Thanks.
 
See the diagrams of the T++2 here (scroll down). The second one shows the correspondence between the labels on the board and the actual pin numbers you would use in your code. There might be a macro which defines D0, D1 etc and maps them to pin numbers but I just use the numbers.

Pete
 
Yes, use this diagram.

pinout4b.png


Those other names are used with direct avr-gcc programming, which used to be much more popular 8 years ago when Teensy++ 2.0 was first made. But that's not recommended now, because it leads to code which is tightly tied to the old AVR chips. Use the Arduino pin numbers and functions like digitalWrite(), so your code is able to work on different hardware without the pain of rewriting almost everything.
 
Status
Not open for further replies.
Back
Top