We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there,
I have an array of 16 colours my sketch selects from, in order over time, col[h]
, When i press a key I want to store the value for h, change the colour to black and then when the key is released I want to return to the original value for h so the colours continue to change in order.
I've managed to switch the colour to black by having the key press select colour 17, black, but when the key is released it relies on the timer stepping to the next colour before it changes and it always goes back to 0.
Is there a way to store the current value for col[h] so that other parts of the program can continue to use it and then return to that value when the key is released?
Cheers Rich
Answers
Better if we can see the code to help...
something like this?
when key is pressed
then when key is released
perhaps?