C implementations for arduino mega 2560