Answer the question
In order to leave comments, you need to log in
Why is the Arduino uno rebooting by itself?
The essence of the problem:
Arduino reboots every 30 seconds, regardless of which sketch is installed (even basik->blink) ...
The sketch itself:
int incomingByte; // входящие данные
int LED = 11; // LED подключен к 11 пину
int LED2 = 12;
void setup() {
Serial.begin(9600); // инициализация порта
pinMode(LED, OUTPUT);
pinMode(LED2, OUTPUT);
}
void loop() {
if (Serial.available() > 0) { //если пришли данные
incomingByte = Serial.read(); // считываем байт
if(incomingByte == '1') {
digitalWrite(LED, HIGH); // если 0, то включаем LED
}
if(incomingByte == '3') {
digitalWrite(LED, LOW); // если 1, то выключаем LED
}
if(incomingByte == '2') {
digitalWrite(LED2, HIGH); // если 1, то выключаем LED
}
if(incomingByte == '4') {
digitalWrite(LED2, LOW); // если 1, то выключаем LED
}
}
}
Answer the question
In order to leave comments, you need to log in
Arduino reboots every 30 seconds no matter which sketch is installed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question