Also, I know this is going to sound really dumb, but it is something I have been trying to fix for such a long time. I have been trying to use button debouncing with if then statements but they don't seem to work.
Let us say this is the beginning of my code:
Code:
gosub rightbuttoncheck ;high then check right side. If right not, then restart.
goto start
rightstart:
gosub nap54ms
if GPIO.3 = 0 then start
gosub checkRmode
rightstart2:
nap 6 ; low power mode for 1.152 of a sec.
if rightbutton = 0 then start
I don't know how to do a "if tact switch (momentary) is pressed, then goto [labe]" type of deal. I tried using the "button" command but that just gave me too many errors that I just dropped it. I was thinking of putting assembly in the and using btsfc or whatever

I know some assembly...just to get me around and understand what a program is doing.
So, if I had a a chip, a wire connect to that chip's pin, that wire to a pin of a momentary tact switch, then the other end to the ground or ground pin of the pic chip. How would I do that in basic, will the above If then statements work...well...they have not worked with me even when I change it to "if rightbutton = 1 (or a 0) then [label]".
Regards and thanks for everything!
P.S. are there any cheaper alternatives to this...is there no example code I can follow?
Bookmarks