I am interfacing the ORP 501Z to a RPI 2040. A key difference between Arduino and the PI is that the PI has a 12-bit A/D. I’m looking at a key line in the sample code (below) and I can’t find a definition for the constants (i.e., “75”, “30”, “1000”). I’m pretty sure the 1024 is 2^10 for the Arduino A/D and I think the 1000/1024 is base conversion.
What is the source for these constants?
orpValue=((30*(double)VOLTAGE*1000)-(75*avergearray(orpArray, ArrayLenth)*VOLTAGE*1000/1024))/75-OFFSET;