#define pin #define mode const int outputPin = 10; void setup() { pin mode(outputPin, OUTPUT); Serial.begin(9600) Serial.println("Podaj czestotliwosc od 100 do 800 Hz"); } void loop { if (Serial.available()) { int f = Serial.parseInt(); if (f == 0){ noTone(outputPin); } else { tone(outputPin, f); } } }