Сайт преподавателя физики Коваленка Юрия Ивановича Physics teacher. Physics notes follow to Instagram @jurij0001 
Воскресенье, 22.12.2019, 03:21
Техническая физика, исследовательские работы, техническое творчество, решение задач по физике
Сайт учителя физики Коваленка Ю.И.Сайт учителя физики Коваленка Ю.И.
код для банера: <!—fizikaotfizika.ru --><a href="http://fizikaotfizika.ru/" mce_href="/" target=_blank><img  src="http://fizikaotfizika.ru/10/Site2.gif"  width="195"  height="200"  alt="Сайт учителя физики Коваленка Ю.И." border="0"></a><!—fizikaotfizika.ru -->



                Физика 

Меню сайта

Вход на сайт

Поиск

Календарь
«  Декабрь 2019  »
ПнВтСрЧтПтСбВс
      1
2345678
9101112131415
16171819202122
23242526272829
3031

Архив записей

Мини-чат
200

Статистика

Онлайн всего: 1
Гостей: 1
Пользователей: 0
Друзья сайта
  • Официальный блог
  • Сообщество uCoz
  • FAQ по системе
  • Мы в Instagram!
  • Мы в YouTube!
  • Мы в Одноклассниках!
  • Мы в Twitter!
  • База знаний uCoz
    • #include <Servo.h>
      Servo servo1;
      const int pinServo=3;
      int tonePin = 2;
      int led1=6;
      int led2=5;
      int led3=9;
      int laser=10;
      int angleServo = 0;
      void setup() {
      servo1.attach(pinServo);
      pinMode( led1, OUTPUT);
      pinMode( led2, OUTPUT);
      pinMode( led3, OUTPUT);
      pinMode(laser, OUTPUT);

      }

      void midi() {

      tone(tonePin, 293, 225.0);
      analogWrite(led1, 100);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led2, 100);
      analogWrite(led1, 0);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led3, 100);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(laser, 255);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 391, 225.0);
      analogWrite(led1, 100);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 293, 450.0);
      analogWrite(led1, 0);
      analogWrite(led2, 50);
      analogWrite(led3, 0);
      servo1.write(90);
      delay(500.0);
      delay(250.0);
      tone(tonePin, 293, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 50);
      servo1.write(120);
      delay(250.0);
      tone(tonePin, 293, 225.0);
      analogWrite(led1, 50);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 50);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led1, 50);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(120);
      delay(250.0);
      tone(tonePin, 391, 225.0);
      analogWrite (led1, 0);
      analogWrite(led2, 50);
      analogWrite(led3, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 329, 450.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(90);
      delay(500.0);
      delay(250.0);
      tone(tonePin, 329, 225.0);
      analogWrite(led1, 0);
      analogWrite(led3, 0);
      analogWrite(led2, 250);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 329, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(150);
      delay(250.0);
      tone(tonePin, 523, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser,0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 587, 450.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(120);
      delay(500.0);
      delay(250.0);
      tone(tonePin, 587, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 255);
      servo1.write(180);
      delay(250.0);
      tone(tonePin, 659, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 587, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 523, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(150);
      delay(250.0);
      tone(tonePin, 493, 675.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(90);
      delay(750.0);
      tone(tonePin, 293, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 293, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(90);
    •  
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(180);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(120);
      delay(250.0);
      tone(tonePin, 391, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 255);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 293, 450.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(30);
      delay(500.0);
      delay(250.0);
      tone(tonePin, 293, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 293, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(120);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 391, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 329, 450.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(500.0);
      delay(250.0);
      tone(tonePin, 329, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 329, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(120);
      delay(250.0);
      tone(tonePin, 523, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(150);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 587, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 587, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(120);
      delay(250.0);
      tone(tonePin, 587, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 255);
      servo1.write(180);
      delay(250.0);
      tone(tonePin, 587, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(150);
      delay(250.0);
      tone(tonePin, 659, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 587, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(120);
      delay(250.0);
      tone(tonePin, 523, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 391, 450.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 0);
      servo1.write(60);
      delay(500.0);
      tone(tonePin, 587, 450.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(90);
      delay(500.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(180);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(150);
      delay(250.0);
      tone(tonePin, 493,
    •  
      450.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(180);
      delay(500.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(120);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(150);
      delay(250.0);
      tone(tonePin, 493, 450.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(180);
      delay(500.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 587, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 255);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 391, 337.5);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(150);
      delay(375.0);
      tone(tonePin, 440, 112.5);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(120);
      delay(125.0);
      tone(tonePin, 493, 450.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(90);
      delay(500.0);
      delay(500.0);
      tone(tonePin, 523, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 523, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 523, 337.5);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 0);
      servo1.write(0);
      delay(375.0);
      tone(tonePin, 523, 112.5);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(125.0);
      tone(tonePin, 523, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(150);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(180);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(150);
      delay(250.0);
      tone(tonePin, 493, 112.5);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(180);
      delay(125.0);
      tone(tonePin, 493, 112.5);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(150);
      delay(125.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(0);
      delay(250.0);
      tone(tonePin, 440, 225.0);
      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 255);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 493, 225.0);
      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(0);
      delay(250.0);
      tone(tonePin, 440, 450.0);

      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(500.0);
      tone(tonePin, 587, 450.0);

      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(0);
      delay(500.0);
      tone(tonePin, 493, 225.0);

      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 493, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 255);
      servo1.write(0);
      delay(250.0);
      tone(tonePin, 493, 450.0);

      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(30);
      delay(500.0);
      tone(tonePin,
    •  
       
      493, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 493, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 493, 450.0);

      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(120);
      delay(500.0);
      tone(tonePin, 493, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 587, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 391, 337.5);

      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(30);
      delay(375.0);
      tone(tonePin, 440, 112.5);

      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(0);
      delay(125.0);
      tone(tonePin, 493, 450.0);

      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 255);
      servo1.write(120);
      delay(500.0);
      delay(500.0);
      tone(tonePin, 523, 225.0);

      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 523, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 523, 337.5);

      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(30);
      delay(375.0);
      tone(tonePin, 523, 112.5);

      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(0);
      delay(125.0);
      tone(tonePin, 523, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 493, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 493, 225.0);

      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 493, 112.5);

      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(0);
      delay(125.0);
      tone(tonePin, 493, 112.5);

      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      analogWrite(laser, 255);
      servo1.write(30);
      delay(125.0);
      tone(tonePin, 587, 225.0);

      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      analogWrite(laser, 0);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 587, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      servo1.write(90);
      delay(250.0);
      tone(tonePin, 523, 225.0);

      analogWrite(led1, 0);
      analogWrite(led2, 0);
      analogWrite(led3, 250);
      servo1.write(60);
      delay(250.0);
      tone(tonePin, 440, 225.0);

      analogWrite(led1, 250);
      analogWrite(led2, 0);
      analogWrite(led3, 0);
      servo1.write(30);
      delay(250.0);
      tone(tonePin, 391, 675.0);

      analogWrite(led1, 0);
      analogWrite(led2, 250);
      analogWrite(led3, 0);
      analogWrite(laser, 255);
      servo1.write(120);
      delay(750.0);
      }

      void loop() {
      // Play midi
      midi();
      }
    Copyright MyCorp © 2019
    uCoz
    Индекс цитирования.