Chris--A / PrintEx

An extension to the Arduino Print library, and much, much more...
GNU General Public License v3.0
61 stars 16 forks source link

ReadMe shows 'x Unsigned decimal integer ( 32bits max ).' That can't be right #38

Open paynterf opened 4 years ago

paynterf commented 4 years ago

The ReadMe section for printf format has the following line:

x Unsigned decimal integer ( 32bits max ).

That can't be right - this format specifier should be for hex display

In fact, these lines in my Arduino code:

    mySerial.printf("Checking for GL530/VLX53LOX at I2C address 0x29 with DEV_ID = 238/0xEE...\n");

    byte DEV_ID = read_byte_data_at(VL53L0X_REG_IDENTIFICATION_MODEL_ID);

    if (DEV_ID == 0xEE)
    {
        mySerial.printf("DEV_ID = %d/0x%x found at I2C addr %#X\n",
            DEV_ID, DEV_ID, GL530_I2C_ADDRESS);
    }

Produces this output

Opening port
Port open
Checking for GL530/VLX53LOX at I2C address 0x29 with DEV_ID = 238/0xEE...
DEV_ID = 238/0xEE found at I2C addr 0x29

Frank