Arduino-Light-Dependent-Resistor-Library icon indicating copy to clipboard operation
Arduino-Light-Dependent-Resistor-Library copied to clipboard

error: 'analogReadResolution' was not declared in this scope

Open duskohu opened this issue 1 year ago • 1 comments

Hi I have errtor: arduino uno wifi rev2

Arduino-Light-Dependent-Resistor-Library-1.4.0/LightDependentResistor.cpp: In member function 'int LightDependentResistor::getCurrentRawAnalogValue() const':
Arduino/libraries/Arduino-Light-Dependent-Resistor-Library-1.4.0/LightDependentResistor.cpp:111:5: error: 'analogReadResolution' was not declared in this scope
     analogReadResolution(_adc_resolution_bits);
     ^~~~~~~~~~~~~~~~~~~~
Arduino-Light-Dependent-Resistor-Library-1.4.0/LightDependentResistor.cpp:111:5: note: suggested alternative: 'analogRead'
     analogReadResolution(_adc_resolution_bits);
     ^~~~~~~~~~~~~~~~~~~~
     analogRead

duskohu avatar Oct 02 '23 13:10 duskohu

I don't have any issue with arduino uno wifi while compiling with Arduino IDE:

image

image

If you still have issue while following those steps, please comment line 110 of cpp file (https://github.com/QuentinCG/Arduino-Light-Dependent-Resistor-Library/blob/master/LightDependentResistor.cpp#L110).

QuentinCG avatar Oct 02 '23 16:10 QuentinCG