Converted to the code to arduino code