I cant get it to detect any movement. There are 3 wires blue,white,orange. I have connected the blue to the ground pin, white wire to digitalIO pin 5 and yellow wire to the 5v pin on the netduino board.
Is this wiring correct ?
I have this code but the interrupt never fires. Has anyone played with this Arduino body movement sensor and got it to work
using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino; namespace SensorTest { public class Program { static OutputPort led = new OutputPort(Pins.ONBOARD_LED, false); static InterruptPort port = new InterruptPort(Pins.GPIO_PIN_D5, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow); public static void Main() { // write your code here Debug.Print("Application Start!"); port.OnInterrupt += new NativeEventHandler(port_OnInterrupt); Thread.Sleep(Timeout.Infinite); } static void port_OnInterrupt(uint portId, uint state, DateTime time) { Debug.Print("Interrupt fired"); led.Write(true); Thread.Sleep(1000); led.Write(false); Thread.Sleep(1000); } } }