hi there, these are some things to remember when migrating projects from 3.x teensy boards to 4.x boards.
probably not a complete list, just the things I stumbled over, that are not that well documented (if at all)
-analogReadResolution() only works for 8 10 and 12 bits, I had it set to 11 on a teensy 3.6 notice that there is no error when compiling with 11 bits, it just goes to 12 bits in that case
-if you use any pins as analog inputs, be sure to use:
in setup(), otherwise you will get wrong readings both above and below mid-point and a jump in the readings at midpoint. this apparently happens because teensy 4.x has "keeper" resistors in place by default on most pins which try to hold the current state, this messes with the analog readings.
-additionaly it might be advisable to generally
all pins that you don't use, since it will save some power (not sure how much though)
I will add more to this post, as I discover other problems
probably not a complete list, just the things I stumbled over, that are not that well documented (if at all)
-analogReadResolution() only works for 8 10 and 12 bits, I had it set to 11 on a teensy 3.6 notice that there is no error when compiling with 11 bits, it just goes to 12 bits in that case
-if you use any pins as analog inputs, be sure to use:
Code:
pinMode(YOUR_PIN,INPUT_DISABLE);
-additionaly it might be advisable to generally
Code:
pinMode(YOUR_PIN,INPUT_DISABLE);
I will add more to this post, as I discover other problems