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() {
100100
101101 // when using u8g8 instead of u8g2, cursor values
102102 // are in characters, not pixels
103+ uint16_t pot_value = analogRead (pot);
104+
103105 Oled.setCursor (0 , 0 );
104106 Oled.print (" But:" );
107+
105108 if (digitalRead (button)) {
106109 digitalWrite (led, HIGH);
107110 Oled.print (" 1" );
108- tone (BUZZER, 440 );
111+ tone (BUZZER, pot_value );
109112 } else {
110113 digitalWrite (led, LOW);
111114 Oled.print (" 0" );
112115 noTone (BUZZER);
113116 }
114117
115- uint16_t pot_value = analogRead (pot);
116118 Oled.setCursor (0 , 1 );
117- Oled.print (" Pot : " );
119+ Oled.print (" BuzPot : " );
118120 Oled.print (pot_value);
119- Oled.print (" " );
121+ Oled.print (" Hz " );
120122
121123 uint16_t mic_value = analogRead (mic);
122124 Oled.setCursor (0 , 2 );
You can’t perform that action at this time.
0 commit comments