Таймер на Arduino nano
В этом видосе я покажу как быстро и не дорого запилить таймер. Который подойдёт для чего угодно хоть для отопления хоть для систематического надувания уточек;)
Вам понадобятся :
Arduino nano http://roboshop.spb.ru/Arduino-Nano-V3
Реле http://roboshop.spb.ru/1-channel-rele
Блок питания http://roboshop.spb.ru/usb-power-5v-2a-fast-charging
Листинг
int potPin = A2; // select the input pin for the potentiometer
int rotPin = A3;
int ledPin = 13; // select the pin for the LED
long val = 0; // variable to store the value coming from the sensor
long val2 = 0;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
}
void loop() {
val = analogRead(potPin); // read the value from the sensor
val2 = analogRead(rotPin);
Serial.print(val * 10);
Serial.print("AAA");
Serial.print(val2 * 2000);
digitalWrite(ledPin, HIGH); // turn the ledPin on
delay(val * 10); // stop the program for some time
digitalWrite(ledPin, LOW); // turn the ledPin off
delay(val2 * 2000); // stop the program for some time
}
Видео Таймер на Arduino nano канала RoboShop
Вам понадобятся :
Arduino nano http://roboshop.spb.ru/Arduino-Nano-V3
Реле http://roboshop.spb.ru/1-channel-rele
Блок питания http://roboshop.spb.ru/usb-power-5v-2a-fast-charging
Листинг
int potPin = A2; // select the input pin for the potentiometer
int rotPin = A3;
int ledPin = 13; // select the pin for the LED
long val = 0; // variable to store the value coming from the sensor
long val2 = 0;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
}
void loop() {
val = analogRead(potPin); // read the value from the sensor
val2 = analogRead(rotPin);
Serial.print(val * 10);
Serial.print("AAA");
Serial.print(val2 * 2000);
digitalWrite(ledPin, HIGH); // turn the ledPin on
delay(val * 10); // stop the program for some time
digitalWrite(ledPin, LOW); // turn the ledPin off
delay(val2 * 2000); // stop the program for some time
}
Видео Таймер на Arduino nano канала RoboShop
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Установка второй подачиДомашняя флора.Печаль тоскаВремя собирать урожай:)Автоматическое включение света за копейкиМузыка тесла за 5ть минутНовогоднее предложение!Первый полёт FPV.Переборка фитолампыLora + Arduino обзор и тестДелаем лучшую в мире игровую приставку. Своими руками, что важно!Переборка квадрика.Настольная лампа WI-FI.LoRA RA-02 и AS32-TTL-100Anet A8Тюнинг майнерской фермы. Апгрейд рига.Тест квадрика и видео трансляцииArduino Pro Mini DMLifeHackДатчик влаги.Отчёт о сборке дрона.