ну кто обещал мне пивасика?
частота 14 гц как на стоке, дьюти 50%
int ledPin = 10;
int duty = 50;
int del = 1000/14;
int del_1= (int)del*(duty/100.0);
int del_2= (int)del*(1-duty/100.0);
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin ledPin as an output.
pinMode(ledPin, OUTPUT);
}
// the loop f unction runs over and over again forever
void loop() {
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(del_1); // wait for a second
digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW
delay(del_2); // wait for a second
}