added c code for arduino