mendozaphd / ADE7878-Arduino

Arduino library to I2C Interface for the Analog ADE7878 Polyphase Multifunction Energy Metering IC with per Phase Active and Reactive Powers
GNU General Public License v3.0
3 stars 3 forks source link

ArduinoIDE 1.8 This library cannot be used #1

Closed he77PC011 closed 1 year ago

he77PC011 commented 1 year ago

ArduinoIDE 1.8 This library cannot be used An error occurred adding the library

he77PC011 commented 1 year ago

Specified folder/zip file does not contain a valid library Invalid library found in C:\Users\he77\Documents\Arduino\libraries\ADE7878-Arduino-main: no headers files (.h) found in C:\Users\he77\Documents\Arduino\libraries\ADE7878-Arduino-main 360截图20230204123913264

he77PC011 commented 1 year ago

C:\Users\he77\Documents\Arduino\libraries\ADE7878-Arduino\examples\ade7878\ade7878.ino: In function 'void loop()': ade7878:95:5: error: 'energia' was not declared in this scope energia.valor[0] = medidor.getVRMS(1); ^~~ exit status 1 'energia' was not declared in this scope

mendozaphd commented 1 year ago

Sorry, I didn't use the Arduino iDE, I used platformIO in Visual Studio Code, I highly recommend it. Are you still having the same problem?

energia is an struct where save the values, you can change it for an float variable or add the struct, sorry, i forget it, add this code before the setup() Thanks for your feedback

typedef struct struct_message { float valor[30]; } struct_message;

struct_message energia;

image