converting from arduino