hey guys I have a pwm speaker set up, with 2 buttons, attempting to make a simple, mini synthesizer
I tested out the fader example first, to make sure it was hooked up, and the speaker changed pitches, however now it won’t - any idea why?
heres my code:
int breading;
int button = 0;
int breading2;
int button2 = 3;
void setup(){}
void loop(){
breading = analogRead(button);
breading2 = analogRead(button2);
if (breading >=1){
if (breading2 <=1){
analogWrite(9, 85);
}}
if (breading <=1){
if (breading2 >=1){
analogWrite(9, 170);
}}
if (breading <=1){
if (breading2 <=1){
analogWrite(9, 255);
}}}
ok - I checked it again, it doesn’t necessarily change tones, but it does go (bear with me) - when it is on the fader code
nerrroooooooooooooreeeeeeeewwww