In the following code I am trying to use pwm to control contrast of a Character LCD. I have been reading this page. http://raspi.tv/2013/how-to-use-soft-pwm-in-rpi-gpio-pt-2-led-dimming-and-motor-speed-control
white = GPIO.PWM(25, 100) # create object white for PWM on port 25 at 100 Hertz red = GPIO.PWM(24, 100) # create object red for PWM on port 24 at 100 Hertz white.start(0) # start white led on 0 percent duty cycle (off) red.start(100)
My question is how to implement something like this into my code.
Here is the code I have. For the record I did not write parts of this but I am unsure who to give credit to.