User Manual
47
For C language users:
Step 2: Change directory
cd /home/pi/SunFounder_SensorKit_for_RPi2/C/07_tilt_switch/
Step 3: Compile
gcc tilt_switch.c –lwiringPi
Step 4: Run
sudo ./a.out
For Python users:
Step 2: Change directory
cd /home/pi/SunFounder_SensorKit_for_RPi2/Python/
Step 3: Run
sudo python 07_tilt_switch.py
Place the tilt switch module horizontally, and the LED will flash green. If you tilt it, "Tilt!" will be
printed on the screen and the LED will change to red. Place it horizontally again, and the LED
will flash green again.










