Hi, I’m an engineer but newbie to all this, hoping someone can help with what may be quite a simple problem!
I’ve adapted some code to to control a simple 3 button remote (On/off, Vol up, Vol down).
I can get the On/Off function to work OK, this just controls a 5v relay. No problem.
(Note that I’m using LED’s at the moment to test functionality, but ultimately I’m hoping the Vol up/down signals control an L298N which will control an ALPS motorised pot).
When I need to increase the volume the signal switches on an LED, and it stays on until I press the button again. I don’t want this, I want the volume LED to stay on for the duration of the button press, and then turn off when I release the button. At the moment one press means that the volume just keeps ramping up, and I need to press the same button again to make it stop.
I’ve tried various commands, but my old brain has just run out of steam - hoping someone can help me?
New_remote_LED_ver2.1.doc (16.5 KB)