Search found 237 matches

by boarchuz
Mon Aug 12, 2019 9:59 pm
Forum: ESP32 Arduino
Topic: How to check the Hall sensor?
Replies: 4
Views: 865

Re: How to check the Hall sensor?

Also from that link:
The ADC1 module must be enabled by calling adc1_config_width() before calling hall_sensor_read(). ADC1 should be configured for 12 bit readings, as the hall sensor readings are low values and do not cover the full range of the ADC.

Code: Select all

adc1_config_width(ADC_WIDTH_BIT_12);
by boarchuz
Fri Aug 09, 2019 4:55 pm
Forum: ESP32 Arduino
Topic: Is it possible to use the RTC to track how long the chip was sleeping
Replies: 4
Views: 1726

Re: Is it possible to use the RTC to track how long the chip was sleeping

With standard gettimeofday implementation: #include <sys/time.h> RTC_DATA_ATTR timeval sleepTime; void setup() { if(esp_sleep_get_wakeup_cause() == ESP_SLEEP_WAKEUP_TIMER) { timeval timeNow, timeDiff; gettimeofday(&timeNow, NULL); timersub(&timeNow,&sleepTime,&timeDiff); printf("Now: %"PRIu64"ms, Du...
by boarchuz
Tue Aug 06, 2019 4:16 pm
Forum: ESP32 Arduino
Topic: External wakeup pin detect issue
Replies: 4
Views: 971

Re: External wakeup pin detect issue

I don't see where wake_up_pin() is called. Check you copied your full sketch here.

Add a couple printouts for wakeup_reason and GPIO_reason, then post the full output here.
by boarchuz
Mon Aug 05, 2019 3:13 pm
Forum: ESP32 Arduino
Topic: Error during runtime after wrapping code in classes (Arduino IDE)
Replies: 2
Views: 619

Re: Error during runtime after wrapping code in classes (Arduino IDE)

You're passing around uninitialised pointers.
by boarchuz
Fri Aug 02, 2019 12:26 pm
Forum: ESP32 Arduino
Topic: DevKitC on Arduino IDE
Replies: 1
Views: 779

Re: DevKitC on Arduino IDE

Flash and RAM are different things. You might tinker with your partition layout if you're hitting flash limits; you might check free heap to debug RAM issues. Make sure you're clear what your problem is. Looks like it uses a WROVER so select the generic one for that- something like "ESP32-WROVER" pr...
by boarchuz
Thu Aug 01, 2019 2:29 pm
Forum: ESP32 Arduino
Topic: OTA with ESP32 as AP
Replies: 6
Views: 2942

Re: OTA with ESP32 as AP

Do you mean that it's trying to upload to "http://x.x.x.x/serverIndex/update" (rather than "http://x.x.x.x/update")? You'll have to figure out how to stop it going to the relative uri instead. Try removing the trailing / from your url (ie. go to "http://x.x.x.x/serverIndex" rather than "http://x.x.x...
by boarchuz
Mon Jul 29, 2019 2:11 am
Forum: ESP32 Arduino
Topic: Instruction execution times, esp. setting GPIOs
Replies: 2
Views: 849

Re: Instruction execution times, esp. setting GPIOs

How about

Code: Select all

GPIO.out_w1ts = (1 << GPIO_NUM_x);
GPIO.out_w1tc = (1 << GPIO_NUM_x);
by boarchuz
Sat Jul 27, 2019 10:53 pm
Forum: ESP32 IDF
Topic: esp_http_client, returning wrong length
Replies: 11
Views: 1913

Re: esp_http_client, returning wrong length

content_length = -1 But the content length is not -1, its 40 They're different things. esp_http_client_get_content_length is the value parsed from the Content-Length header. If the server doesn't provide this, as is the case with your link, it will return -1. You should revisit the example because ...
by boarchuz
Sat Jul 27, 2019 9:59 pm
Forum: ESP32 IDF
Topic: esp_http_client, returning wrong length
Replies: 11
Views: 1913

Re: esp_http_client, returning wrong length

Use any http traffic monitor and you'll see that it is: Transfer-Encoding: chunked (with no "Content-Length" header) esp_http_client_get_content_length(client) should be returning -1 for chunked. No problem there. esp_http_client_fetch_headers(client) should be returning 0 for chunked... after calli...
by boarchuz
Thu Jul 25, 2019 3:56 am
Forum: ESP32 IDF
Topic: esp_http_client, returning wrong length
Replies: 11
Views: 1913

Re: esp_http_client, returning wrong length

I (3374) INFO: HTTP_EVENT_ON_DATA, len=40 If you're referring to this, that value is the number of bytes received and ready for your app to process from that chunk, not the value of the content length header (and not necessarily the total length). It happens to be equivalent to the total length in ...

Go to advanced search