COAST-Lab / c3po

Coastal Conductivity Communication Probe
0 stars 2 forks source link

Check sig figs in data string #26

Open SUPScientist opened 2 months ago

SUPScientist commented 2 months ago

In

https://github.com/COAST-Lab/ConductivitySensor_Old/blob/42f6ad3f61daf9208db27fdebbddd982a49db844/Firmware/AtlasConductivity_20240724/src/AtlasConductivity_20240724.cpp#L153-L156

it appears that different numbers of digits are reported from the temp vs. cond sensor. Check to see how many the sensor reports and record/transmit all.

gracelower commented 1 month ago

Line 153 snprintf(data, sizeof(data), "%li,%.5f,%.02f", Line 154 real_time, // if it takes a while to connect, this time could be offset from sensor recording Line 155 temp, Line 156 cond

format specifiers %.5f and %.02f control how many digits are shown after the decimal point for floating-point values (temp and cond)

––> Adjust specifiers based on what sensors report so we receive same number of digits for cond + temp sensors (INCORRECT, SEE BELOW)

11/01/2024 According to datasheets ... RTD reports to 0.001 resolution with accuracy [+/– (0.1 + 0.0017 x ̊C)] EC reports between 5 µS/cm to 200,000 µS/cm with accuracy [+/- 2%] Next step: test each sensor to see decimal place output; update specifiers to make sure all decimal places are reported for each sensor

gracelower commented 3 weeks ago

Attempting to update code / fix this issue, but returning this error when trying to install SdFat library: "Access token provided is invalid"

https://api.particle.io/v1/libraries/SdFat?version=latest

Is SdFat no longer available? Or is my software not compatible / do I need to update something?

Update: 11/01/2024 --> this was an account issue; SdFat was able to be installed. Now: returning an error for Ezo_i2c.h logging library, which is required for I2C language with Ezo (exit code 2 w/o it!)

SUPScientist commented 3 weeks ago

That's a particle login issue most likely. Check that you're logged into your particle account in VS Code