C code for Arduino