March 2019
Intermediate to advanced
312 pages
7h 37m
English
For the blinking LED program using softPWM, you will need one led. In my case, I have connected the negative pin of the LED to physical pin 6 (ground pin) of the RPi, and the positive pin of the LED is connected to wiringPi pin 15. The wiring connection is shown in the following diagram:

After connecting the led to the RPi, it's time to write the program. The program for blinking the led using the softPWM library is as follows. This program is called Soft_PWM_Blink.cpp, and you can download this program from the Chapter02 folder of this book's GitHub repository:
#include <iostream>#include <wiringPi.h> ...