User Manual

44
For C language users:
Step 2: Change directory
cd /home/pi/SunFounder_SensorKit_for_RPi2/C/06_button/
Step 3: Compile
gcc button.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 06_button.py
The LED on the module will emit green light. If you press the button, "Button pressed" will be
printed on the screen and the LED will emit red light. If you release the button, "Button
released" will be printed on the screen and the LED will flash green again.