39
Then press Enter to exit. Type in
nano 01_blinkLed.py
again to see the effect after the
change.
Run the code to make it work. It will be like below:
Further Exploration
If you want the LED to speed up the blinking, just change the delay time. For example,
change the time to delay (200) (for C) or time.sleep(0.2) (for python) in the program,
recompile and run, and then you will see the LED blink faster.
Summary
Raspberry Pi packages many low-level detail designs, which ease your way to explore your
own apps. Maybe that is the charm of Raspberry Pi. Now you have already learnt how to
use the Raspberry Pi GPIO to blink an LED. Keep moving to the next contents.
FAQ
If you haven't modified the code, you do not need to run
make
01_blinkLed
again.
make 01_blinkLed
Or a message will appear: make: ’01_blinkLed’ is up to date
It will not appear only when you run the make command after having changed the code
and saved it.
Tips
: For any TECHNICAL questions, add a topic under
FORUM
section on our website
and we'll reply as soon as possible.
Содержание Super Kit 3.0
Страница 7: ...4 22 RGB LED 1 23 LED red 8 24 LED white 4 25 LED green 4 26 LED yellow 4 27 NPN Transistor S8050 2 ...
Страница 30: ...27 Also we have drawn a table of the corresponding BCM wiringPi and Name of each pins ...
Страница 78: ...75 Now pull the slide and you can see the two LEDs light up alternately ...