good evening everyone,
i have a small problem with my Picaxe 08M2. i have a small program that reads in a potentiometer at C.1 and dims a led at the output C.2 corresponding to the potentiometer. now i would like to replace the potentiometer with 2 buttons (up and down). do any of you experts have an idea?
many thanks for the help.
greetings Bruno
my Prog.
#picaxe 08M2
setfreq m32
init: pwmout C.2,97,0 ; start pwm
main: readadc10 C.1 , w1 ; input Pot
w1= w1/16*6
pwmout pwmdiv64, C.2, 97,w1
Goto main
*******************************************************************************************************************************************
i have a small problem with my Picaxe 08M2. i have a small program that reads in a potentiometer at C.1 and dims a led at the output C.2 corresponding to the potentiometer. now i would like to replace the potentiometer with 2 buttons (up and down). do any of you experts have an idea?
many thanks for the help.
greetings Bruno
my Prog.
#picaxe 08M2
setfreq m32
init: pwmout C.2,97,0 ; start pwm
main: readadc10 C.1 , w1 ; input Pot
w1= w1/16*6
pwmout pwmdiv64, C.2, 97,w1
Goto main
*******************************************************************************************************************************************