acs712_30A was not declared in this scope error

veeresh's picture


Joined: Jun 07, 2020

Replies: 0
acs712_30A was not declared in this scope error
June 7, 2020 - 11:48am

igot error for the  project " IoT Based Electricity Energy Meter using ESP12 and Arduino" i am doing this project but i got the program executed  for node mcu but i get the error 'acs712_30A was not declared in this scope' for the arduino part . please help me where i went wrong.

Debasis Parida's picture


Joined: Aug 22, 2019

Replies: 124

Hi, it seems the ACS712 sensor library was not installed correctly, so pls check that and if still problem persists, then paste the complete error you are getting.

Sourav Gupta's picture


Joined: Feb 12, 2018

Replies: 367

Is #include "ACS712.h" declared?


Debashis Das's picture


Joined: Dec 02, 2019

Replies: 112

The problems with the header file. if you have included the library with the Add .ZIP Library.. method, then you have to do #include <ACS712.h>  not #include "ACS712.h".


If you do #include "ACS712.h" the preprocessor is searching the library in the project directory, not in the predetermined directory.