Загрузка страницы

Таймер на 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
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
18 декабря 2018 г. 14:16:40
00:02:13
Яндекс.Метрика