File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -100,23 +100,25 @@ void loop() {
100
100
101
101
// when using u8g8 instead of u8g2, cursor values
102
102
// are in characters, not pixels
103
+ uint16_t pot_value = analogRead (pot);
104
+
103
105
Oled.setCursor (0 , 0 );
104
106
Oled.print (" But:" );
107
+
105
108
if (digitalRead (button)) {
106
109
digitalWrite (led, HIGH);
107
110
Oled.print (" 1" );
108
- tone (BUZZER, 440 );
111
+ tone (BUZZER, pot_value );
109
112
} else {
110
113
digitalWrite (led, LOW);
111
114
Oled.print (" 0" );
112
115
noTone (BUZZER);
113
116
}
114
117
115
- uint16_t pot_value = analogRead (pot);
116
118
Oled.setCursor (0 , 1 );
117
- Oled.print (" Pot : " );
119
+ Oled.print (" BuzPot : " );
118
120
Oled.print (pot_value);
119
- Oled.print (" " );
121
+ Oled.print (" Hz " );
120
122
121
123
uint16_t mic_value = analogRead (mic);
122
124
Oled.setCursor (0 , 2 );
You can’t perform that action at this time.
0 commit comments