Skip to content

Commit 3441adc

Browse files
authored
Merge pull request #55 from jacobhylen/jacobhylen/dac-analogwave-fix
Update sineWave example of AnalogWave core library
2 parents e6729f9 + 3bf3c4a commit 3441adc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: 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)