Added code for the microcontroller