Re: toggle switches and buttons-- need little help
If you want your code to just check the position of the switches, set the corresponding LED's and then move on to something else (like checking if a button is pressed then something like this should work. You will just need to take into account how often the program will make it to this part of the code to check switch postion.
Code:
If switch1 = 1 then switch1LED=1 else switch1LED=0
If switch2 = 1 then switch2LED=1 else switch2LED=0
'now continue on to the rest of the program...
hope this helps...
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Bookmarks