AirBoard and PowerDown Problems

Does anyone have a real example of how to get the Airboard to power down to deep sleep while using an XBee module and interrupts using a reed switch? I'm scouring the Internet looking for examples and I can find none. Airboard's website is useless as there's practically nothing on it. GitHub examples are not applicable etc...

Even though I do board.PowerDown() it still uses power and the battery dies in a few hours.

Do you have to power down the XBee first? Any insight would be greatly appreciated!

TIA

Airboard's website is useless

At least you know where it is. Most of us have no idea what an airboard is. Something like a clue-by-four for an airhead?

Hmm... not sure where you were going with that. But if were weren't being sarcastic, the website is http://www.theairboard.cc/

You are right. The tech specs on the page are full of nonsense.

Something can be as big as an elephant, or as small as a mouse. Something can be half as big as something else. It can NOT be twice as small, though.

Something can use 70000 times as much power. It can not use 70000 times less power.

Regardless, you have some code that puts the device to sleep. You haven't shown that. You don't say whether the XBee is going to sleep, or staying awake drawing current.

I have no idea if you need to put the XBee to sleep or if the AirBoard does it for you. I have a 10K Ohm resistor on D3 to GND and my Reed is normally open (closed w/ magnet) which is on D3 to 3V3. Here’s my code:

#include <TheAirBoard.h>

#define GREEN 5    // GREEN dimmable LED
#define BLUE  6    // BLUE dimmable LED
#define RED   9    // RED dimmable LED
int REED_PIN = 3;

TheAirBoard board;

void setup() {
 pinMode(GREEN, OUTPUT); // initialize the digital pin as an output
 pinMode(BLUE, OUTPUT);  // initialize the digital pin as an output
 pinMode(RED, OUTPUT);   // initialize the digital pin as an output
 pinMode(REED_PIN, INPUT);
}

void loop() {
 if (digitalRead(REED_PIN) == HIGH) {
   analogWrite(GREEN, 10);
   delay(500);
   digitalWrite(GREEN, 0);
 } else {
   analogWrite(BLUE, 10);
   delay(500);
   digitalWrite(BLUE, 0);
 }

 enterSleep();
}

void pin3Interrupt(void) {
 //detachInterrupt(1);
}

void enterSleep(void) {
 attachInterrupt(1, pin3Interrupt, CHANGE);
 delay(100);

 board.powerDown();

 sleep_disable();
}

Yes I realize there is no XBee code here. I removed it as I don’t even care about it at this point. I just want it to stop sucking power during sleep.

Help is greatly appreciated!!!