Цитата:
Сообщение от HuanCarlos
уже все плохо - пинги проходят %10,
вебморда практически перестала работать.
|
Попробуй использовать библиотеку leOS2.
Использует WDT таймер
Пример
Код HTML:
#include "leOS2.h" //include the scheduler
leOS2 myOS; //create a new istance
//variables to manage the LED
const byte LED13 = 13;
byte LEDstatus = 0;
//setup routine
void setup() {
myOS.begin(); //initialize the scheduler
//pins as output
pinMode(LED13, OUTPUT);
//add the tasks
myOS.addTask(flashLed, myOS.convertMs(1000));
}
//main loop - it's empty
void loop() {}
//this task will flash the LED on pin D13
void flashLed() {
LEDstatus ^= 1;
digitalWrite(LED13, LEDstatus);
}
Основной цикл здесь можно вообще не использовать.