matthias-bs / BresserWeatherSensorReceiver

Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver for Arduino based on CC1101, SX1276/RFM95W or SX1262
MIT License
121 stars 23 forks source link

ESP32AnalogRead error #189

Closed mczakk closed 3 months ago

mczakk commented 3 months ago

I'm trying to update my ESP32 Lora boards and am having an issue with the ESP32AnalogRead this is the error i get:

/home/matt/Arduino/libraries/ESP32AnalogRead/ESP32AnalogRead.cpp:187:35: error: 'ADC_WIDTH_12Bit' was not declared in this scope; did you mean 'ADC_WIDTH_MAX'?
  187 |                 adc1_config_width(ADC_WIDTH_12Bit);
      |                                   ^~~~~~~~~~~~~~~
      |                                   ADC_WIDTH_MAX

All my libraries are up to to date but the code is failing to compile with this error?

matthias-bs commented 3 months ago

Please see https://github.com/madhephaestus/ESP32AnalogRead/issues/13#issuecomment-2207225345 Did you encounter this in https://github.com/matthias-bs/BresserWeatherSensorTTN?

mczakk commented 3 months ago

It's in my bespoke code based on yours. I'd not updated the esp32 boards for a year or so, all I wanted to do s change the text on the display! I'll try it without defining the bit that uses espanalogread, see what that does!

matthias-bs commented 3 months ago

There are several options:

matthias-bs commented 3 months ago

Created https://github.com/matthias-bs/BresserWeatherSensorTTN/issues/92

mczakk commented 3 months ago

I'm going to close this, i have opened another issue in BresserWeatherSensorLW if you have the time to help me there?

matthias-bs commented 3 months ago

@mczakk I just noticed that I already updated the ADC code in https://github.com/matthias-bs/BresserWeatherSensorTTN/releases/tag/v0.13.0. You seem to have missed this when comparing your code to the latest version.