Code written for Arduino used to simulate microcontroller input