Arduino Uno, Imp Shield, Motion Sensor

Hello,
I have a motion sensor successfully working on an Arduino Uno w/ an Imp shield. I want to use the motion “trigger” to post an http request to my server, but I haven’t made it that far. My thought was to monitor pin8 (the same pin I flash an LED) for DIGITAL_IN. I was thinking if the LED gets a message to be ON/OFF, then it should be considered digital in since that code is being executed in the Arduino microcontroller. But, the callback isn’t getting called. Here is the code I’m using. Any thoughts?

// you can read the imp’s input voltage at any time with:
local voltage = hardware.voltage();
server.log(format(“Running at %.2f V”, voltage));

// define our callback function.
function changed() {
server.log(“pin changed”);

local motionState = hardware.pin8.read();
if (motionState == 0) {
    server.log("motion detected");
} else {
    server.log("no motion");
}

}

server.log(“Motion sensor started”);

// configure the imp’s hardware
hardware.pin8.configure(DIGITAL_IN, changed);
imp.configure(“Motion Sensor”, [], []);

I figured it out…I ran a wire from pin 8 to pin 5 and monitored pin 5 for digital_in.

// you can read the imp’s input voltage at any time with:
local voltage = hardware.voltage();
server.log(format(“Running at %.2f V”, voltage));

// define our callback function.
function changed() {
local motionState = hardware.pin5.read();
if (motionState == 1) {
server.log(“motion detected”);
} else {
server.log(“no motion”);
}
}

server.log(“Motion sensor started”);

// configure the imp’s hardware
hardware.pin5.configure(DIGITAL_IN, changed);
imp.configure(“Motion Sensor”, [], []);