0

In my code, I have float Hz = 0.00; I want to display values to my user in RPM as

Serial.print("Speed = ");
Serial.print(round(Hz*60);
Serial.println(" RPM);

The only hangup is that this displays as Speed = XX.00 RPM is there an easy way to get the Arduino to only print out Speed = XX RPM?

1 Answer 1

2

From the documentation:

Serial.print(round(Hz*60), 0);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.