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
Содержание Nexus Robot
Страница 74: ...www nexusrobot com Robot Kits manual 70 Sample Wiring Diagram for RB004 2WD V2 0...
Страница 92: ...www nexusrobot com Robot Kits manual 88 Diagram for Omni3WD_V1 0...
Страница 96: ...www nexusrobot com Robot Kits manual 92 Diagram_Omni3WD_V3 3...
Страница 118: ...www nexusrobot com Robot Kits manual 114 Sample Wiring Diagram for RB011 Mecanum 4WD V4 1...