Comments (6)
Hi @ChassaB
What version of esp32-arduino are you using? It must be >=2.0.0 (IDF version 4.x)
from hulp.
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.
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.
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.
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.
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)
- undefined reference error in example code for simple debugging HOT 4
- support for mpu6050 HOT 2
- problems reading sht3x i2c sensor HOT 10
- How can I make this work with Arduino? HOT 3
- touch, ULP FSM instructions, without macros
- is i2c bitbang limited to RTC GPIOs ?? HOT 2
- Variable gets a value as if the shift command had not been executed HOT 4
- Possible confrontation with some libraries HOT 7
- HULP ADC read problem while wake up HOT 2
- HULP I2C Hardware Read Wemos Ambient Light sensor BH1750 question HOT 5
- I2C bitbang CRC third byte does not match HOT 23
- Measuring pulse length in milliseconds HOT 5
- ESP32 Not Waking On I_WAKE() HOT 3
- feature request: UART with parity bit HOT 2
- ADC example, comparing if value is wihin a range, rather than just under a threshold HOT 3
- issue with I_GPIO_HOLD_DIS HOT 7
- ESP32-S2 HOT 2
- Add librairies in Arduino ide HOT 11
- Pulse counter HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hulp.