File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
libraries/SAMD_AnalogCorrection/examples/CorrectADCResponse Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1818 6) Open the Serial Monitor and press the reset button on the Arduino ZERO
1919 7) At the and of the procedure you can find logged
2020 - the offset and gain values for the board where the sketch has been just executed
21- - the instruction line to copy/paste in the final sketch
21+ - the code to copy/paste in sketches using this library
2222*/
2323
2424#include " SAMD_AnalogCorrection.h"
3232#define ADC_MIN_GAIN 0x0400
3333#define ADC_UNITY_GAIN 0x0800
3434#define ADC_MAX_GAIN (0x1000 - 1 )
35- #define ADC_RESOLUTION_BITS 12
35+ #define ADC_RESOLUTION_BITS 12 // do not change. This library only supports 12 bit resolution.
3636#define ADC_RANGE (1 << ADC_RESOLUTION_BITS)
3737#define ADC_TOP_VALUE (ADC_RANGE - 1 )
3838
@@ -162,7 +162,8 @@ void setup()
162162 Serial.println (offsetCorrectionValue);
163163 Serial.print (" Gain = " );
164164 Serial.println (gainCorrectionValue);
165- Serial.println (" \r\n Add the next line to your sketch:" );
165+ Serial.println (" \r\n Add the next lines to your sketch:" );
166+ Serial.println (" analogReadResolution(12);" );
166167 Serial.print (" analogReadCorrection(" );
167168 Serial.print (offsetCorrectionValue);
168169 Serial.print (" , " );
You can’t perform that action at this time.
0 commit comments