Dear,
I’m trying to Sleep/Wake Up Endpoint, by ultra low power mode SM1.
I’m reading some examples, wakeup time (about 15s), etc.
Actually EndPoint is :
S2C Pro (Firmware 4059) :
EndPoint = API2, SM1, D70 : Arduino Uno
Coord = API2
#include
#define XBEE_sleepPin 9
int i=0;
uint8_t text[] = {'H', 'e', 'l', 'l', 'o'};
XBee xbee = XBee();
XBeeAddress64 remoteAddress = XBeeAddress64(0x0013a200, 0x40d99bdd); //0x40e5f312);
ZBTxRequest zbTx = ZBTxRequest(remoteAddress, text, sizeof(text));
void setup () {
delay(1000);
Serial.begin(9600);
xbee.setSerial(Serial);
}
void loop () {
i++;
Serial.print("i=");Serial.println(i);
xbee.send(zbTx);
if (i==10) {
sleep_XBEE();
delay(3000);
}
if (i==200){
wake_XBEE();
delay(20000);
}
if (i==400) i=0;
}
void sleep_XBEE() {
pinMode (XBEE_sleepPin,INPUT); // put XBee to sleep
//digitalWrite(XBEE_sleepPin,LOW); // Setting this pin to LOW turns off the pull up resistor, thus saving precious current
digitalWrite(XBEE_sleepPin,HIGH); //??????
delay(400);
}
void wake_XBEE() {
pinMode(XBEE_sleepPin,OUTPUT); // Set the "wake-up pin" to output
digitalWrite(XBEE_sleepPin,LOW); // wake-up XBee
delay(400);
}
No wakeup, never ? In SM5, it’s ok, but no SM1 ???
Do you have any idea ?
Best regards.