// Geworkian Michael
//#include <TonePitch.h>
int toneheight = 0;
void setup() { Serial.begin(9600);
pinMode(A0, INPUT);// Вертик. Для измен-я f.
//pinMode(A1, INPUT);
pinMode(A5, INPUT);//To turn On/off
}
void loop() {
// Serial.println("\n Press joystick to turn on sound.");
int flag=0;
// if подправить
if(analogRead(A5)==1) noTone(3);
if(analogRead(A5)==0) {
toneheight = map(analogRead(A0),0,1023, 200,400);//См. РЕАЛ!
//Было 255
tone(3,toneheight,10); Serial.println(toneheight);
//delay(100);
}
}
// #define TONE_USE_INT
// #define TONE_PITCH 440