analogRead on teensy 3.2

Status
Not open for further replies.
You see, that's what I'm wondering. I have the Arduino doc. But I suspected that this one was different. Is there different data ranges on this machine? What's the default? How do I switch?

'Cause I figured if it was 0-0, 3.3-1023 my volts to number mapper (Withe a 2:1 voltage divider) would be..

mapper data2voltMapper(0, 1023, 0, 6.6); // Update for 3.2V chip

Is this NOT the case?


P.S. Thanks!

-jim lee
 
Have you tried it? Not sure what your question is?

You can Change the resolution from 10 bits, by using the api analogReadRes. For example analogReadRes(12); will get you range of 0-4095...
 
By default it is 10 bits if for compatibility. So if you don't use analogReadRes() in your program 0v is 0 adc reading and 3.3v is 1023. If you do use analogReadRes(12) 0v is 0 adc reading and 3.3v is 4095. Some other options include analogReadRes(8) for 0 to 255 and analogReadRes(13) for 0 to 8191.
 
Last edited:
Status
Not open for further replies.
Back
Top