Skip to content

Commit d704a5e

Browse files
authored
Update exampleAnalogReadFast.ino
1 parent 5c12c5d commit d704a5e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1+
// http://www.avdweb.nl/arduino/libraries/fast-10-bit-adc.html
12

3+
#include "avdweb_AnalogReadFast.h"
4+
const byte adcPin = A1;
5+
6+
#if defined(__arm__)
7+
analogReadResolution(12);
8+
//analogReadResolution(10);
9+
#endif
10+
11+
void setup(void)
12+
{ Serial.begin(9600);
13+
//analogRead(adcPin); // first analogRead is wrong
14+
}
15+
16+
void loop(void)
17+
{ Serial.println(analogReadFast(adcPin));
18+
}

0 commit comments

Comments
 (0)