We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fin1 & Fin2 are long ints (4 bytes) on an Arduino Mega, and 'SteeringValue' is a float. This code:
Serial.print("Fin1 = "); Serial.print(Fin1); Serial.print(", "); Serial.print("Fin2 = "); Serial.print(Fin2); Serial.print(", "); Serial.print("SteeringValue = "); Serial.println(SteeringValue); mySerial.printf("Fin1 = %d, Fin2 = %d, SteeringValue = %3.2f\n", Fin1, Fin2, SteeringValue); Produces this output on an Arduino Mega 2560
Serial.print("Fin1 = "); Serial.print(Fin1); Serial.print(", "); Serial.print("Fin2 = "); Serial.print(Fin2); Serial.print(", "); Serial.print("SteeringValue = "); Serial.println(SteeringValue); mySerial.printf("Fin1 = %d, Fin2 = %d, SteeringValue = %3.2f\n", Fin1, Fin2, SteeringValue);
Fin1 = 9185, Fin2 = 18370, SteeringValue = 28851.73 Fin1 = 9185, Fin2 = 0, SteeringValue = 0.00 Why is this?
Fin1 = 9185, Fin2 = 18370, SteeringValue = 28851.73 Fin1 = 9185, Fin2 = 0, SteeringValue = 0.00
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Fin1 & Fin2 are long ints (4 bytes) on an Arduino Mega, and 'SteeringValue' is a float. This code:
Serial.print("Fin1 = "); Serial.print(Fin1); Serial.print(", "); Serial.print("Fin2 = "); Serial.print(Fin2); Serial.print(", "); Serial.print("SteeringValue = "); Serial.println(SteeringValue); mySerial.printf("Fin1 = %d, Fin2 = %d, SteeringValue = %3.2f\n", Fin1, Fin2, SteeringValue);
Produces this output on an Arduino Mega 2560
Fin1 = 9185, Fin2 = 18370, SteeringValue = 28851.73 Fin1 = 9185, Fin2 = 0, SteeringValue = 0.00
Why is this?
The text was updated successfully, but these errors were encountered: