/* * NOTE: this test is for HFS-DC06H * * * If the Digital Hi (reads as 1's in serial) doesn't go away, and you are using USB, * you might need external power. Some USB is not enough. * Especially when ethernet is active. * Ethernet draws power, even if library is not active. */ int MotionSensor = 8; // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); // make the pushbutton's pin an input: pinMode(MotionSensor, INPUT); } // the loop routine runs over and over again forever: void loop() { // read the input pin: int MotionState = digitalRead(MotionSensor); // print out the state of the button: Serial.println(MotionState); delay(300); // delay in between reads for stability }