Other OS

how to keep value duty of pwm in banana pi using RPi.GPIO library

3 2762
korect  
i'm using RPi.GPIO library to control GPIO pin
to control led brightness i'm using pwm but after program end, a led off
i'm using RPi.HIGH to turn on a led, after program end a led keep on
im not using GPIO.cleanup()
my question how to keep a led on after program end using pwm to control a led brightness
You cannot end the program.

The program has to keep running in order to keep the PWM going.

korect  
mikronauts replied at Wed Dec 3, 2014 09:57
You cannot end the program.

The program has to keep running in order to keep the PWM going.

i try to control LED brightness in website using pwm but value of duty can't saved

there are other ways ? to control LED brightness

Edited by mikronauts at Fri Dec 5, 2014 10:25
korect replied at Fri Dec 5, 2014 07:03
i try to control LED brightness in website using pwm but value of duty can't saved

there are othe ...


As I said in my last response, you have to keep the program running - which means you also need to keep the banana pi running

You can run the program from /etc/rc.local, then it will run every time you start up

Alternately, you could get something like the Adafruit 16 channel "servo" controller, which is actually a PWM LED controller, and once you set the PWM channel on it, it will keep it at the same value ... as long as the board has power.

You have to log in before you can reply Login | Sign Up

Points Rules