Skip to content

using Serial.printf to print uint64_t #109

@trlafleur

Description

@trlafleur

If I try to use Serial.printf to print two uint64_t variables, the 2nd one prints as a zero...

Arduino 1.8.13
Feather M0
Adafruit SAMD21 Boards 1.6.0

void setup() {
     Serial.begin (115200);              // Initialize USB/serial connection
     delay(2000);

     Serial.printf("hello...\n");

uint64_t A = 12345678l;
uint64_t B = 87654321l;

Serial.printf ("A: %lu, B: %lu\n", A, B);

Serial.printf ("A: %lu\n", A);
Serial.printf ("B; %lu\n", B);

}

void loop() {
  // put your main code here, to run repeatedly:

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions