VMP502
V. 02
–
25/10/2019
10
©Velleman nv
Set the GPIO to a low level in turn by programming and LEDs 0 to 7 will light in turn. Control the delay and
order to make the LEDs blink in different effects.
Experiment
C Programming
1.
Change directory:
cd/home/pi/IDUINO_SuperKit_C_code_for_RaspberryPi/03_8Led/
2.
Compile:
gcc 8Led.c
–
o 8Led
–
lwiringPi
3.
Run:
sudo ./8Led
Python Programming
1.
Change directory:
cd/home/pi/IDUINO_SuperKit_Python_code_for_RaspberryPi/
2.
Run:
sudo python 03_8Led.py
You will see eight LEDs light circularly and render different effects.
You can write the blinking effects of the LEDs in an array. If you want to use one of these effects, you can call it
in the
main()
function directly.
Summary of Contents for VMP502
Page 1: ...VMP502 BASIC LEARNING KIT FOR RASPBERRY PI USER MANUAL...
Page 8: ...VMP502 V 02 25 10 2019 8 Velleman nv Programming C Programming Python Programming...
Page 11: ...VMP502 V 02 25 10 2019 11 Velleman nv Programming C Programming...
Page 17: ...VMP502 V 02 25 10 2019 17 Velleman nv Programming C Programming...
Page 18: ...VMP502 V 02 25 10 2019 18 Velleman nv Python Programming...
Page 21: ...VMP502 V 02 25 10 2019 21 Velleman nv Programming C Programming Python Programming...
Page 27: ...VMP502 V 02 25 10 2019 27 Velleman nv Programming C Programming Python Programming...
Page 30: ...VMP502 V 02 25 10 2019 30 Velleman nv...
Page 31: ...VMP502 V 02 25 10 2019 31 Velleman nv Python Programming...
Page 32: ...VMP502 V 02 25 10 2019 32 Velleman nv...
Page 36: ...VMP502 V 02 25 10 2019 36 Velleman nv Python Programming...
Page 40: ...VMP502 V 02 25 10 2019 40 Velleman nv...
Page 41: ...VMP502 V 02 25 10 2019 41 Velleman nv Python Programming...
Page 44: ...VMP502 V 02 25 10 2019 44 Velleman nv...
Page 45: ...VMP502 V 02 25 10 2019 45 Velleman nv Python Programming...
Page 46: ...VMP502 V 02 25 10 2019 46 Velleman nv...
Page 47: ...VMP502 V 02 25 10 2019 47 Velleman nv...
Page 48: ...VMP502 V 02 25 10 2019 48 Velleman nv...