We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70ed05b commit a13dd6bCopy full SHA for a13dd6b
libraries/AdafruitFeather52Examples/Hardware/adc/adc.ino
@@ -0,0 +1,20 @@
1
+int adcin = A5;
2
+int adcvalue = 0;
3
+float mv_per_lsb = 3600.0F/1024.0F; // 10-bit ADC with 3.6V input range
4
+
5
+void setup() {
6
+ Serial.begin(115200);
7
+}
8
9
+void loop() {
10
+ // Get a fresh ADC value
11
+ adcvalue = analogRead(adcin);
12
13
+ // Display the results
14
+ Serial.print(adcvalue);
15
+ Serial.print(" [");
16
+ Serial.print((float)adcvalue * mv_per_lsb);
17
+ Serial.println(" mV]");
18
19
+ delay(100);
20
0 commit comments