displays as unsigned integer why?

6 Comments

The question does not contain enough information to be answered.
well the range for a 16 bit integer is
-32,768 to +32,767
however for an unsigned 16 bit integer it is
0 and 65,535 In the picture we see 65535 shown but in fact is -1 because that while the bits are the same, it is being wrongly interpreted by the chart program on the website.
A 16-bit integer can store 216 (or 65,536) distinct values. In an unsigned representation, these values are the integers between 0 and 65,535; using two's complement, possible values range from −32,768 to 32,767.
So i guess my question is there as setting to have 65,535 treated as a signed integer so the chart looks right?
@bill buersch perhaps you need to show the code that generates this chart.
i can't because it is thingspeak code that generates the chart. it's the chart you get when you log in. it interprets as unsigned when it should interpret as signed. but i see that there is no way it would know.
bill buersch
bill buersch on 21 Dec 2022
Moved: DGM on 21 Dec 2022
notice that when the outside air temp rises above 0 it's fine.
bill buersch
bill buersch on 21 Dec 2022
Moved: DGM on 21 Dec 2022
data as stored: 2022-12-21 12:36:13 UTC,1,65535,,,,,,,

Sign in to comment.

Answers (0)

Categories

Products

Asked:

on 21 Dec 2022

Moved:

DGM
on 21 Dec 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!