Print64 (community library)


Name Value
Name Print64
Version 0.0.1
Installs 686
License MIT
Author Rick Kaseguma
Download .tar.gz

Library for 64-bit number to ASCII conversion

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.


Library for printing 64-bit integers on Particle devices

The standard C library on Particle devices (at least as of Device OS 3.0) does not support 64-bit sprintf formatting such as %llu or %llx or Microsoft extensions like %I64u. This includes not only sprintf(), and its variations like snprintf(), but also things that use it, like


toString (uint64_t)

Convert an unsigned 64-bit integer to a string

String toString(uint64_t value, unsigned char base = 10);
  • value The value to convert (uint64_t)
  • base The number base. Acceptable values are 2, 8, 10, and 16. Default is 10 (decimal).
  • Returns A String object containing an ASCII representation of the value.
toString (int64_t)

Convert an signed 64-bit integer to a string (ASCII decimal signed integer)

String toString(int64_t value);
  • value The value to convert (int64_t)
  • Returns A String object containing an ASCII representation of the value (decimal)


#include "Particle.h"

#include "Print64.h"

SerialLogHandler logHandler;

void setup() {


void loop() {"millis=%s", toString(System.millis()).c_str());

The System.millis() function returns a uint64_t. It works like millis() but since it's 64-bit, it doesn't wrap around to 0 after 49 days so it's easier to do comparisons with it.

Note that you must add a .c_str() to the result of toString() when passing it as variable arguments to sprintf(),, etc.!

Browse Library Files