What is the best way to code in order to utilize switch control?
For example, I want:
Switch1(RB5): Displays "Hello!" on LCD when pressed once
Switch2(RB6): Displays "Hey There!" on LCD when pressed once
Switch3(RB7): Toggles blinking when pressed once
The idea I have is like this:
Unfortunately this is not a good idea since it does not work every time (because of the instruction cycle clock).
I'm sure there is a much more efficient way.
Please advise.
Sincerely me.
For example, I want:
Switch1(RB5): Displays "Hello!" on LCD when pressed once
Switch2(RB6): Displays "Hey There!" on LCD when pressed once
Switch3(RB7): Toggles blinking when pressed once
The idea I have is like this:
Rich (BB code):
while(RB5){
while(!RB5)
{
[code for display on LCD here]
}
}
I'm sure there is a much more efficient way.
Please advise.
Sincerely me.