Skip to content

Commit

Permalink
Update exampleAnalogReadFast.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
avandalen authored Sep 7, 2024
1 parent 5c12c5d commit d704a5e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/exampleAnalogReadFast/exampleAnalogReadFast.ino
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
// http://www.avdweb.nl/arduino/libraries/fast-10-bit-adc.html

#include "avdweb_AnalogReadFast.h"
const byte adcPin = A1;

#if defined(__arm__)
analogReadResolution(12);
//analogReadResolution(10);
#endif

void setup(void)
{ Serial.begin(9600);
//analogRead(adcPin); // first analogRead is wrong
}

void loop(void)
{ Serial.println(analogReadFast(adcPin));
}

0 comments on commit d704a5e

Please sign in to comment.