I am new to the forum and working on some lights and a horn project on my cargo bike. I often have my daughter on the back so I need to be seen, and I want to be heard when needed.
So, I have a 12 v battery, 11 high power LEDs, a 12 v motorcycle horn and a push button. What I want is the lights to flash, I can handle that. But, when I push the handlebar mounted horn button, I intend to send a high to an input, want to run an interrupt and stop the LEDs, and sound the horn. I have a hand drawn schematic attached.
I intend to control all of the LEDs and the Horn externally through 4 TIP41C NPN transistors.
That all makes sense to me, I am just struggling w/ interrupts, could someone give me an example of the code to flash an LED, until a button is pushed and then all the LED outputs (low) and the horn (high)?