Skip to content

Example doesn't seem to work properly. #8

New issue

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

Closed
NoSmoke999 opened this issue Jan 17, 2021 · 5 comments
Closed

Example doesn't seem to work properly. #8

NoSmoke999 opened this issue Jan 17, 2021 · 5 comments
Labels
conclusion: resolved Issue was resolved topic: documentation Related to documentation for the project type: imperfection Perceived defect in any part of project

Comments

@NoSmoke999
Copy link

The example:
int i = 1; float pi = 3.1459; Debug.print(DBG_VERBOSE, "i = %d, pi = %f", i, pi);

Results in:
i = 1, pi = ?

It looks like pi=%f doesn't work.

@per1234
Copy link
Contributor

per1234 commented Jan 17, 2021

Hi @NoSmoke999. I'm guessing you're using one of the AVR boards like the Uno, classic Nano, Pro Mini, Leonardo, Micro, or Mega. Is that correct?

If so, I think the situation is discussed here: arduino/ArduinoCore-avr#293

@NoSmoke999
Copy link
Author

NoSmoke999 commented Jan 18, 2021

Hey, correct - using a Uno. The discussion in the link you provided is way above my pay grade so I'll just assume for now that floating pt print can't be done now on an AVR board(?). Anyhow, thank you for the info. :)

PS: If Serial.print(pi); will print the floating pt #, why can't DebugUtils?

@klodoma
Copy link

klodoma commented Jan 25, 2022

It's ok not to work and it makes sense.
It should be made clear in the library description for which Arduino boards it works, not to use it on Uno.

@per1234 per1234 added topic: documentation Related to documentation for the project type: imperfection Perceived defect in any part of project labels Jan 26, 2022
@klodoma
Copy link

klodoma commented Jan 26, 2022

This seems to be a good way to output floats on nano

float temp=1.2345;
Debug.print(DBG_INFO, "Temp: %s", String(temp, 2).c_str());

@aentinger
Copy link
Contributor

Closed due to #26 .

@per1234 per1234 added the conclusion: resolved Issue was resolved label Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: documentation Related to documentation for the project type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants