Skip to content

Commit 3bf3c4a

Browse files
committed
Update sineWave example of AnalogWave
1 parent a086f96 commit 3bf3c4a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libraries/AnalogWave/examples/SineWave/SineWave.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ int freq = 10; // in hertz, change accordingly
66

77
void setup() {
88
Serial.begin(115200);
9-
pinMode(A0, INPUT);
109
wave.sine(freq);
1110
}
1211

1312
void loop() {
14-
freq = map(analogRead(A0), 0, 1024, 0, 10000);
13+
freq = map(analogRead(A5), 0, 1024, 0, 10000);
1514
Serial.println("Frequency is now " + String(freq) + " hz");
1615
wave.freq(freq);
1716
delay(1000);

0 commit comments

Comments
 (0)