User Manual
Table Of Contents
VMP502
V. 02 – 25/10/2019 7 ©Velleman nv
Use a NO button as the Raspberry Pi
®
input. When the button is pressed, the GPIO connected to the button will
turn into low level (0 V). We can detect the state of the GPIO connected to the button through programming.
You can run the corresponding code when the button is pressed, and the LED will light.
Experiment
C Programming
1. Change directory:
cd/home/pi/IDUINO_SuperKit_C_code_for_RaspberryPi/02_BtnAndLED/
2. Compile:
gcc BtnAndLed.c –o BtnAndLed –lwiringPi
3. Run:
sudo ./BtnAndLed
Python Programming
1. Change directory:
cd/home/pi/IDUINO_SuperKit_Python_code_for_RaspberryPi/
2. Run:
sudo python 01_btnAndLed.py
Hold the button pressed and the LED will light; release the button to switch off the LED.










