Hi, I am developing a project to read and compare the electricity consumption of 3 independent circuits.
I am using non invasive current sensors.
I have this prototype code to check what works and what does not.
I would like to be able not to have to use the same code over and over again so I built an array of sensors but it is not working as I may be missing something.
Objects do not have names at run time. They only have addresses. You can not do what you are trying to do, that way. You CAN create arrays, including arrays of objects.
You have two arrays named AreaLabes. One is global, declared char * when it should be just char. The other is local to the setup() function, which is probably a mistake right there, but I cannot help with the declaration because I don't know what an EnergyMonitor is. Multiple uses of the same name are likely to get you into trouble.
Why you think that you can do Area00.calcIrms I don't know.
Hi, thanks.
I can´t say I understood it all but it will serve as basis for my research.
I will work with all the tips above to rebuild the prototype code above.
Regards
Paulo