This is an old revision of the document!
Codul pentru bilbioteca ZigduinoSleep poate fi descăcat de aici.
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: #include <avr/sleep.h> #include <avr/interrupt.h> #include <ZigduinoSleep.h> int led = 11; int state = 0; void setup() { pinMode(led, OUTPUT); Serial.begin(9600); Serial.println("Sleep test"); ZigduinoSleepInit(); } void loop() { ZigduinoSleepSet(1); //Code that is executed before sleep state ^= 1; if(state == 0) digitalWrite(led, HIGH); else digitalWrite(led, LOW); Serial.begin(9600); Serial.println("Test"); Serial.flush(); Serial.end(); //End of code ZigduinoSleep(); }