Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

Instrument Output Indications on IO
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Instrument Output Indications on IO

by wsquared58 on Fri Mar 20, 2020 8:45 am

Adafruit Sensors.jpg
Adafruit Sensors.jpg (83.74 KiB) Viewed 48 times


I have two breakout boards, a BME280 and an MPRLS, that I am sending the output to IO.
The indications while technically are accurate, they are making step changes rather than drawing an real representation of what is happening in reality.
I've had this isuue before but never really addressed until now.
I have attached a jpg to show what I am talking about. Sample rate is every 4 minutes.

wsquared58
 
Posts: 160
Joined: Sun Jun 09, 2019 9:13 pm

Re: Instrument Output Indications on IO

by brubell on Fri Mar 20, 2020 10:04 am

they are making step changes rather than drawing an real representation of what is happening in reality.


Hey wsquared, I'm not sure what you mean by this sentence. Could you point out in the screenshot where the data is erroneous or misbehaving and write what you'd expect to see from IO?

brubell
 
Posts: 792
Joined: Fri Jul 17, 2015 10:33 pm

Re: Instrument Output Indications on IO

by wsquared58 on Fri Mar 20, 2020 10:41 am

BME vs Local weather Station.jpg
BME vs Local weather Station.jpg (94.05 KiB) Viewed 37 times



If you look at the BME 28O pressure, temperature, and humidity, those should all be curves. For example with the temperature, if I adjust the thermostat up say 5 degrees, it isn't going just pop straight up. It may not be IO it may be the frequency that I am running the script (4 minutes) but I've seen this happen before and then just sort of act more like I would expect which is no stair step but curves up or down

As I said above the script is set to run every 4 minutes and IO trend blocks are set for seven days.

I grabbed local weaather station barometric pressure and charted it for same time as the BME.

The earlier data where it is flatlining I wouldn't worry about that. You can see that the BME follows the same track as the local weather stations data it is doing that stairstepping. Barometric pressure changes are slow enough in stable weather that the 4 minute sample time should not impact.

wsquared58
 
Posts: 160
Joined: Sun Jun 09, 2019 9:13 pm

Re: Instrument Output Indications on IO

by wsquared58 on Sat Mar 21, 2020 7:16 am

Think I have it figured out. Used code from Adafruit weather station example as base. Code was
Code: Select all | TOGGLE FULL SIZE
aio.send(pressure_feed.key, int(pressure_data))
for example so it was in effect rounding up and down and that was creating the stair-step appearance. Removed the int so it was
Code: Select all | TOGGLE FULL SIZE
aio.send(pressure_feed.key, (pressure_data))
and things are good to go.

wsquared58
 
Posts: 160
Joined: Sun Jun 09, 2019 9:13 pm

Please be positive and constructive with your questions and comments.