acs712_30A was not declared in this scope error

veeresh's picture

Offline

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

Offline

Joined: Aug 22, 2019

Replies: 125

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

Offline

Joined: Feb 12, 2018

Replies: 626

Is #include "ACS712.h" declared?

 

Debashis Das's picture

Offline

Joined: Dec 02, 2019

Replies: 117

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.

 

 

 

Iradukunda Jean Damour's picture

Offline

Joined: Jan 19, 2021

Replies: 1

I was add acs712 library and I also use header#include but I still have error of ACS712_30A was not declared in this scope
Please help