Microcontroller code for led interactivity