I m using the correct place now but still changing the temperature constant or even changing the salinity calibration temperature manually does not change anything in the displayed salinity value. i think its not calculating the compensation formula. heres my code that i m using in the library now:
okay I've tested the code but i have made a minor change to it. I created a memory location for the salinity constant "Alpha" and I have placed this line into my code:
The problem is no matter what value I set Alpha to the compensation remains the same. I have tried many values starting from 240 and changed it from 1 to 1000 and the salinity value stays the same.
However, when i change the "Salinity Temp Compensation" value to a different one the salinity changes. I've been trying to figure out why this is happening but I couldnt find a solution. Could it be this part of the code "InternalMemory.Alpha_read()/100000" the controller is not calculating properly?
Could be.
Are you sure that you are reading the correct memory location?
Just print somewhere on the screen what the controller is reading from InternalMemory.Alpha_read();
I m using ReefAngel Status to change the value in memory. I have Alpha placed in memory location 3 and when i read the value in location 3 it gets the correct value I changed it to. Do you think it might differ if i print on the screen InternalMemory.Alpha_read();
this is part of my custom memory locations in globals.h:
When using the compensation, do we need to set the compensation temperature as well as enabling it? I would think that we would want to tell it what temperature we plan on using but I'm not 100% positive. Could somebody clarify please?
When you enable the compensation, you should recalibrate.
It will store the temperature in which the calibration happened in the internal memory and use it as reference.
To enable compensation and use the default alpha value, use this:
Ok cool. I didn't know it stored the temperature used during the calibration.
I already have the SetCompensation(0) line in my code. I just didn't know about the temperature stored.
Does it have to be calibrated to 35ppt or can we change that value? Or does it really matter if it's calibrated to 35ppt? I believe I run my tank salinity slightly lower (around 1.024 or 32ppt).
Yes, needs to be calibrated at 35ppt and you can't change it
If you want to create a FlexibleSalinityCalibration() function , maybe others could benefit from it too
rimai wrote:Yes, needs to be calibrated at 35ppt and you can't change it
If you want to create a FlexibleSalinityCalibration() function , maybe others could benefit from it too
Maybe. I will see.
It seems like I don't even have enough time to get stuff done that I "need" to get done.
rimai wrote:When you enable the compensation, you should recalibrate.
It will store the temperature in which the calibration happened in the internal memory and use it as reference.
To enable compensation and use the default alpha value, use this: