We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be92228 commit f2ffe30Copy full SHA for f2ffe30
1 file changed
Make_It_Twist_Potentiometer/analog-read.ino
@@ -0,0 +1,21 @@
1
+// Simple read analog potentiometer on Circuit Playground Express or other board with pin change
2
+// Mike Barela for Adafruit Industries 9/2018
3
+
4
+// Which pin on the microcontroller board is connected to the NeoPixels?
5
+#define PIN A1 // For Circuit Playground Express
6
7
+int delayval = 500; // delay for half a second
8
9
+void setup() {
10
+ Serial.begin(9600); // open the serial port at 9600 bps
11
+}
12
13
+void loop() {
14
+ int value;
15
16
+ value = analogRead(PIN); // analog read of potentiometer
17
18
+ Serial.println(value); // print value
19
20
+ delay(delayval); // Delay for a period of time (in milliseconds).
21
0 commit comments