Pulse Width Modulation (PWM)

Hello folks,

I found a nice example on PWM in the PI4J project.  See PWM Example.  I tried it on my Raspberry PI B+.  I wired a little circuit with a led and tried it out.  It worked smoothly.  The led faded on and off which was the goal.  I had been trying this on my car based on the javadoc but it was not working so I needed a plain simple example to see how this PWM works and just to be sure it does work on my Raspberry Pi. Seeing this example immediately rang a bell why it was not working on the car.  I had configured and set the pulse in the enable pin but a little further in my application the enable pin was set high which I guess overruled the PWM setting.  I know what to change now and try it out.

Leave a Reply