File tree 1 file changed +4
-3
lines changed
libraries/SAMD_AnalogCorrection/examples/CorrectADCResponse
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 18
18
6) Open the Serial Monitor and press the reset button on the Arduino ZERO
19
19
7) At the and of the procedure you can find logged
20
20
- 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
22
22
*/
23
23
24
24
#include " SAMD_AnalogCorrection.h"
32
32
#define ADC_MIN_GAIN 0x0400
33
33
#define ADC_UNITY_GAIN 0x0800
34
34
#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.
36
36
#define ADC_RANGE (1 << ADC_RESOLUTION_BITS)
37
37
#define ADC_TOP_VALUE (ADC_RANGE - 1 )
38
38
@@ -162,7 +162,8 @@ void setup()
162
162
Serial.println (offsetCorrectionValue);
163
163
Serial.print (" Gain = " );
164
164
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);" );
166
167
Serial.print (" analogReadCorrection(" );
167
168
Serial.print (offsetCorrectionValue);
168
169
Serial.print (" , " );
You can’t perform that action at this time.
0 commit comments