Giter VIP home page Giter VIP logo

Comments (6)

boarchuz avatar boarchuz commented on May 23, 2024

Hi @ChassaB
What version of esp32-arduino are you using? It must be >=2.0.0 (IDF version 4.x)

from hulp.

ChassaB avatar ChassaB commented on May 23, 2024

Right,
in the Arduino IDE Boards Manager it is 1.0.6 for the ESP32 install, which is the current latest release under the board manager. My version of the IDE is 1.8.16.

Do I need to go to the ESP GIT and find ESP32 core version 2 or do I need to install Arduino IDE V2?

Can you clarify. I'll go looking

from hulp.

boarchuz avatar boarchuz commented on May 23, 2024

Try following the instructions for 2.0.x here: https://github.com/espressif/arduino-esp32#esp32-s2-and-esp32-c3-support
I was under the impression 2.0.0 was released but maybe it's not available in the boards manager yet for some reason.
Updating the IDE sounds like a good idea if you're still having issues.

from hulp.

ChassaB avatar ChassaB commented on May 23, 2024

Yes, the espressif GitHub says it is but not so. I updated to the latest Arduino IDE a couple of days back so it should be up to date but I'll check again tomorrow as I'm now getting the following errors with your example ADC sketch using the ESP32 Dev Module as the selected board.

Users/charlesburgess/Library/Arduino15/packages/esp32/hardware/esp32/2.0.0/tools/sdk/esp32/include/esp_common/include/esp_err.h:122:30: note: in definition of macro 'ESP_ERROR_CHECK'
esp_err_t err_rc_ = (x);
^
In file included from /Users/charlesburgess/Documents/Arduino/libraries/HULP/src/hulp_arduino.h:1,
from /Users/charlesburgess/Documents/Arduino/libraries/HULP/examples/ADC/basic/basic.ino:9:
/Users/charlesburgess/Documents/Arduino/libraries/HULP/src/hulp.h:46:11: note: declared here
esp_err_t hulp_configure_analog_pin(gpio_num_t pin, adc_atten_t attenuation, adc_bits_width_t width);
^~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1
too few arguments to function 'esp_err_t hulp_configure_analog_pin(gpio_num_t, adc_atten_t, adc_bits_width_t)'

from hulp.

boarchuz avatar boarchuz commented on May 23, 2024

Sorry, that's because I haven't updated the Arduino example.

If you look at the corresponding IDF example (main/main.cpp) you should see what needs to be changed. I'll fix it soon.

from hulp.

ChassaB avatar ChassaB commented on May 23, 2024

Thanks. Yes I see what needs to be changed;
Replaced
/*ESP_ERROR_CHECK(hulp_configure_analog_pin(PIN_ADC_PIN1));
ESP_ERROR_CHECK(hulp_configure_analog_pin(PIN_ADC_PIN2));
ESP_ERROR_CHECK(hulp_configure_analog_pin(PIN_ADC_PIN3));
ESP_ERROR_CHECK(rtc_gpio_pullup_en(PIN_ADC_PIN3));
*/
with
ESP_ERROR_CHECK(hulp_configure_analog_pin(PIN_ADC_PIN1, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12));
ESP_ERROR_CHECK(hulp_configure_analog_pin(PIN_ADC_PIN2, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12));
ESP_ERROR_CHECK(hulp_configure_analog_pin(PIN_ADC_PIN3, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12));
ESP_ERROR_CHECK(rtc_gpio_pullup_en(PIN_ADC_PIN3));

I assume the additional 2 lines from the IDF example are needed as well?
ESP_ERROR_CHECK(hulp_ulp_load(program, sizeof(program), 1000UL * ULP_WAKEUP_INTERVAL_MS, 0));
ESP_ERROR_CHECK(hulp_ulp_run(0));

Now that it is working I'll have to go through and better understand the code. Haven't done anything with assembler since the 6502 in the early '80s.

Thanks for your help. If I can help with documentation or something I'd be happy to.

from hulp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.