Manual
www.nexusrobot.com Robot Kits manual 
  18
¾  Digital Read Serial 
Fall Detector Example 
This example shows you how to monitor the state of a Fall detector by establishing serial communication 
between your Arduino and your computer over USB. 
Sample code 
const int PIN = 12;    //set pin 12 as the signal pin 
void setup() 
{ 
 Serial.begin(9600); 
 pinMode(PIN,INPUT); //set mode 
} 
void loop() 
{ 
 bool val = 0; 
 val = digitalRead(PIN); //read pin 12 
 Serial.println(val); //display the value 
 delay(500); 
} 
   Chooce the serial port 
 Open the serial Monitor 










