Card Temperature

I have been logging Notecard temperatures in my apps and also using the the NotecardPseudoSensor library during development.

I upgrade the firmware on a development unit (WBNAW) to last stable notecard-u5-6.1.1 and the card.temperature request only returns integer Celcuius values.

All my there notecards seem to be reporting with resolution of 0.0625C.

Unfortunately when i upgraded this WBNAW, i also cleaned up the old event data on notehub. But i dont remember the temps being only integer!

Are the card.temperature replies different for each notecard version? or did my notecard-u5-6.1.1 firmware change the replies.


Nothing has changed regarding the card.temp API. I just ran a quick test with my Notecard WBNAW on v6.1.1 and Iā€™m getting a float in the response:

> {"req":"card.version"}
 "version": "notecard-",
 "device": "dev:860322068073292",
 "name": "Blues Wireless Notecard",
 "sku": "NOTE-WBNAW",
 "board": "5.13",
 "wifi": true,
 "cell": true,
 "gps": true,
 "api": 6,
 "body": {
  "org": "Blues Wireless",
  "product": "Notecard",
  "target": "u5",
  "version": "notecard-u5-6.1.1",
  "ver_major": 6,
  "ver_minor": 1,
  "ver_patch": 1,
  "ver_build": 16332,
  "built": "Dec 22 2023 14:46:26"
> {"req":"card.temp"}
 "value": 21.75,
 "calibration": -1
1 Like

Depending on which flags you used to compiled your sketch, you may have disabled float support.

If you are using the Arduino IDE look under the Tools menu, and if you are using PlatformIO, be sure to add -D PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF to the build_flags.


1 Like

I was my fault! I copied some sample code from the arduino docs that was retrieving integer values from Notecard responses . I forgot to change it for floats response fields.

JGetInt ā†’ JGetNumber