Skip to content

Code to print int64_t and uint64_t for UNO (and maybe DUE) #194

Closed
@RobTillaart

Description

@RobTillaart

In - http://arduino.cc/forum/index.php/topic,143584.0.html - I posted code to be able to print int64_t and uint64_t for the UNO.
Not tested on other platforms but the code is very straightforward,
Drawback is it adds 8KB to a sketch so placed some #ifdefs in the proposed code.

Rob

Activity

diegozaks

diegozaks commented on May 29, 2016

@diegozaks

What's the status on this? Any updates?

Chris--A

Chris--A commented on Jun 2, 2016

@Chris--A

@RobTillaart
If this does not end up in the core I'd be happy to add it to my PrintEx lib. Thus giving you and easy way to use it without having to add it to the core on each update.

Is the 8Kb a flat addition or only when used? If it is added without using it, I think I may be able to mitigate this in PrintEx.

RobTillaart

RobTillaart commented on Jun 2, 2016

@RobTillaart
Author

That code is from long long ago ;)
As far as I recall it only adds 8K when actually used. The linker is smart enough.

I had a quick look at the code again and I (still) propose the print9() version which has imho a good balance between footprint and speed and understandability.

@Chris--A
Feel free to add the code to your printEx library so it can be used. Please add a link to the forum thread above.

JensGrabner

JensGrabner commented on May 30, 2017

@JensGrabner

I have make a pgm, that convert integer up to 64-bit to a String - you can used.
https://github.com/JensGrabner/snc98_Slash-Number-Calculator/tree/master/Software/Arduino/libraries/itoa_ljust

sadr0b0t

sadr0b0t commented on Aug 8, 2017

@sadr0b0t

Any chance to see this patch in upstream?

RobTillaart

RobTillaart commented on Aug 13, 2017

@RobTillaart
Author

Created pull request - arduino/Arduino#6608

RobTillaart

RobTillaart commented on Jul 5, 2020

@RobTillaart
Author

Created my own lib to solve this - https://github.com/RobTillaart/printHelpers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @cmaglie@RobTillaart@sadr0b0t@diegozaks@JensGrabner

      Issue actions

        Code to print int64_t and uint64_t for UNO (and maybe DUE) · Issue #194 · arduino/ArduinoCore-avr