Arduino 14 - kohutik

From DT^2
Revision as of 11:02, 6 August 2019 by Palo (talk | contribs)
Jump to: navigation, search
#define SIRENA 12

void setup() {
  pinMode(SIRENA, OUTPUT);
}

void c()
{
  tone(SIRENA, 261);
  delay(200);
    noTone(SIRENA);
  delay(50);
}

void d()
{
  tone(SIRENA, 294);
  delay(200);
    noTone(SIRENA);
  delay(50);
}

void e()
{
  tone(SIRENA, 330);
  delay(200);
    noTone(SIRENA);
  delay(50);
}

void f()
{
  tone(SIRENA, 349);
  delay(200);
  noTone(SIRENA);
  delay(50);
}

void loop() {
  c(); d(); e(); f(); f(); f();
  f(); e(); d(); e(); e(); e();
  e(); d(); c(); d(); d(); d();
  d(); e(); d(); c(); c(); c();  
}