Here and example of Arduino with PIR motion sensor. The PIR motion sensor detects motion within its range and sends a signal to the Arduino board. The Arduino board processes the signal and sends a ...
void loop() { // Read digital line sensor data int sum = 0; for (int i = 0; i < 5; i++) { if (LINE_DETECT_WHITE == 0) { linesensor_data[i] = 1 - digitalRead ...