Newbie here, I am trying to build a bike light controller to control the intensity of my homemade bike lights. What I am trying to accomplish is this:
1 Press button one time-turn light on to full intensity using hpwm.
2 Press button again(any time after first press)-lower intensity, lower pulse width.
3 Press button again-lowest intensity. Maybe 50% duty cycle.
4 Press and hold button for two seconds-light off.
I am having a hard time finding what commands to use-COUNT, RCTIME, lots of IF THEN and GOTO. It seems I can get close but no cigar. I have been using the PBP user manual and Chuck Hellebuyck's book Programming Pic Microcontrollers with PicBasic. I just do not have any programming experience to reference.
I am using PBP, Microcode Studio Plus, Picallw and the P16PRO40 programmer.
Note to other newbies: if your programmer has problems, try another computer-many manhours to make this observation.
Thanks to all for viewing and any help or direction you could provide.
Caddydan
Bookmarks