Translate code to Arduino from WinAVR