Comments: Raspberry gPIo
Looking for answers to technical questions?
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
If you've found an issue with this tutorial content, please send us your feedback!
Line 3: pi@raspberrypi ~/code/wiringPi $ cd wiringPi Line 4: pi@raspberrypi ~/code/wiringPi/wiringPi $ ./build
Actually this doesn't work any more. You can skip Line 3 and go directly to line 4
At the end of the section about PWM you state that "Just don’t forget to set the pin as an output before you use it for PWM." However the PWM functionality is not dependent on how the pin is configured through the GPIO interface as an input or output. The PWM system is a separate block of hardware and when it is routed to the pin by configuring the mode registers of the pin to enable "alternative function 5", the normal GPIO system (setting it as input or output) no longer has any effect on the pin's behavior.
If you look for example at the Broadcom bcm2835 C library you can see that first thing they do is to set the pin alternative function register to disable GPIO and connect the PWM system. Further info can be found here: https://www.airspayce.com/mikem/bcm2835/index.html
Simon
does anyone else have issues getting the PWM pin LED to light up? I have tried several LEDs just in case i got a bad one but no luck. Using a Raspberry Pi 3 model B with Pi wedge wired to meet the tutorial.