You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arduino DUE has 12-bit ADC so I have changed the analog reference code. But i did not know that default resolution for DUE is 10-bit, you have to change it in the code with "analogReadResolution(bits)".
My question is, are we gonna use this advantage of DUE and every library will include this code for the case of use DUE or ZERO, or do we use default settings for 10-bit resolution of the ADC for all boards?
There is an issue that if we use 12-bit resolution for DUE, all functions for converting data from analog pins have to be defined for both boards... It means if I read analog position from a sensor and wanna convert it to percents:
data*(100/1023) for UNO
data*(100/4095) for DUE
So library have to have a rework (maybe in .h file) where all 1023 which are used e.g. in mapFloat() function, will be replaced by 4095.... I hope, you know what i mean.
Arduino DUE has 12-bit ADC so I have changed the analog reference code. But i did not know that default resolution for DUE is 10-bit, you have to change it in the code with "analogReadResolution(bits)".
My question is, are we gonna use this advantage of DUE and every library will include this code for the case of use DUE or ZERO, or do we use default settings for 10-bit resolution of the ADC for all boards?
AutomationShield/src/AutomationShield.h
Line 37 in 78befb7
To see what I added to make 12-bit resolution in Magneto library chack the link:
AutomationShield/src/MagnetoShield.cpp
Line 28 in 7f707ad
The text was updated successfully, but these errors were encountered: