I’m trying to return the cellular signal strength of my Boron using CellularSignal, but I’m getting “-1” reading from .getStrength and .getQuality and I’m getting “0” reading from getStrengthValue and getQualityValue no matter where I place my device (inside or outside).
How often are you executing this code? Particle.variable() is only ever called once for each individual variable - not each time the value of the variable changes.
The variables that you register with Particle.variable() need to be global too (or you provide a function that “calculates” the value on the fly) - but local variables are no good.
The problem is that CellularSignal is a container that holds the strength and quality values returned from Cellular.RSSI(). Since this is a global variable in your code, the values are retrieved only once, at global object construction, when the cellular connection is not up yet, so there are no strength values. You need to make this a local variable in loop, not a global.