need language support : emon library variables
there are public and private variables in EmonLib.h,
can i use a public variable like Vrms in main loop? ( use example voltage_and_current )
Serial.print(Vrms); does not compile!
Archived Forum |
|
need language support : emon library public variables - RESOLVEDSubmitted by Guest on Tue, 29/05/2012 - 06:15need language support : emon library variables there are public and private variables in EmonLib.h, can i use a public variable like Vrms in main loop? ( use example voltage_and_current ) Serial.print(Vrms); does not compile! » |
Re: need language support : emon library public variables - RESOLVED
SOLVED:
Serial.println(emon1.Vrms); // works
Re: need language support : emon library public variables - RESOLVED
That is because Vrms is a property of the class "EnergyMonitor", which you have instantiated as "emon1".
If you had several instances of the class EnergyMonitor, as you do in the sketch EmonTx_CT123_Voltage.ino:
Then you would use