float roll = (atan2(-accValues[1], accValues[2])*180.0)/M_PI; float pitch = (atan2(accValues[0], sqrt((float)accValues[1]*(float)accValues[1] + (float)accValues[2]*(float)accValues[2]))*180.0)/M_PI;
float roll = (atan2(-accValues[1], accValues[2])*180.0)/M_PI; float pitch = (atan2(accValues[0], sqrt((float)accValues[1]*(float)accValues[1] + (float)accValues[2]*(float)accValues[2]))*180.0)/M_PI;