updated arduino code to have hard bounds for parameters