That is doable. If GP4 is LOW, making GP0 or GP1 or GP2 High will make the connected LED light. The same for GP5.
Being I do not know the sequence you want them to light here is an idea.
Your code will have the "blinking" sequence with multiple pauses. The value of the pauses will be held in a variable. A button will connect to GP3 as an interrupt. Every time the button is pushed the variable will increase by the amount you want. Once the highest value is reached the variable will reset to the lowest.
Maybe something like that will work for you.Code:"VARIABLES X VAR WORD:Y VAR WORD:Z VAR WORD ON INTERRUPT GOTO MYINT INTCON=%10001000 IOC = %00001000 '############## 'YOUR SEQUENCE '############## DISABLE MYINT: IF GPIO.3 = 1 THEN X = X * 10 Y = Y ??? Z = Z ??? pause 100 IF X => ? THEN X = ?? IF Y => ? THEN Y = ?? IF Z => ? THEN Z = ?? INTCON.1 = 0 RESUME ENABLE





Bookmarks