Search found 94 matches

by Craige Hales
Thu Sep 29, 2022 2:07 pm
Forum: Hardware
Topic: What's the best way to differentiate between two custom ESP32 boards?
Replies: 9
Views: 5538

Re: What's the best way to differentiate between two custom ESP32 boards?

Similar discussion https://maker.pro/forums/threads/serial-number-rom-ic-with-spi-or-i2c-interface.32369/ suggested https://www.allaboutcircuits.com/electronic-components/datasheet/DS2401%2B--Maxim-Integrated/ which looks like a $3 serial number. But if I had several available input pins, I'd use th...
by Craige Hales
Sat Sep 10, 2022 7:09 pm
Forum: ESP32 Arduino
Topic: ESP32-A2DP Problem understanding the use of 'const uint8_t*'
Replies: 1
Views: 1841

Re: ESP32-A2DP Problem understanding the use of 'const uint8_t*'

You wrote this callback: void avrc_metadata_callback(uint8_t data1, const uint8_t *data2) { and the library calls it like this: avrc_metadata_callback(rc->meta_rsp.attr_id, rc->meta_rsp.attr_text); data1 appears to describe what data2 points to. data2 points to a string (most likely, I didn't look t...
by Craige Hales
Sat Sep 10, 2022 6:29 pm
Forum: ESP-WHO
Topic: Position detection using ESP32
Replies: 2
Views: 37519

Re: Position detection using ESP32

Search for OpenCV (computer vision.) https://github.com/joachimBurket/esp32-opencv The problem will be simpler if you can use a single camera above the shelf, and good contrast colors. Then you are just counting circular patches of not-shelf-color or bottle-cap-color. OpenCV might be overkill for th...
by Craige Hales
Sat Sep 03, 2022 11:05 am
Forum: ESP-IDF
Topic: ADC DMA example, I cannot decode it
Replies: 3
Views: 2762

Re: ADC DMA example, I cannot decode it

The number after the : is the number of bits in a bit field. https://www.tutorialspoint.com/cprogramming/c_bit_fields.htm for example. That structure tells me there are ADC_RESULT_BYTE==4 bytes per sample. The first 12 bits of the first 2 bytes are data, and the compiler will generate the code neede...
by Craige Hales
Thu Sep 01, 2022 1:05 pm
Forum: ESP-IDF
Topic: ADC DMA example, I cannot decode it
Replies: 3
Views: 2762

Re: ADC DMA example, I cannot decode it

line 3: result is an array of TIMES elements, each is uint8_t. All elements are initialized to 0. Then all elements are set to xCC. The values are from 0 to 255 after the call to adc_digi_read_bytes. Since it is not declared static, and is inside a function, it is on the local stack for the duration...
by Craige Hales
Thu Aug 25, 2022 1:12 pm
Forum: ESP-IDF
Topic: Expose FILE handler in esp32
Replies: 1
Views: 1057

Re: Expose FILE handler in esp32

(Been a while since I've thought about this, and I suspect I am misunderstanding, but...) It sounds like you've called C++ code which expects a C++ stream parameter, from C code using a FILE* argument. You can't make that work by casting a FILE* to a C++ stream; you'll need to write a bit of .cpp fi...
by Craige Hales
Mon Aug 15, 2022 1:42 pm
Forum: ESP-ADF
Topic: esp32-s3 ota update fail
Replies: 1
Views: 3747

Re: esp32-s3 ota update fail

Start with the first error message: E (4844) FATFS_STREAM: Failed to open. File name: /sdcard/flash_tone.bin, error message: Invalid argument, line: 116 The cascade of errors after that may go away when this is resolved. edit: googling the message returns https://github.com/espressif/esp-adf/issues/...
by Craige Hales
Sat Aug 13, 2022 1:07 pm
Forum: ESP IoT Solution
Topic: A way to fast check if wifi access point is available
Replies: 2
Views: 3853

Re: A way to fast check if wifi access point is available

I have a powered device, so never measured, but I think you might want something similar wifi_scan_config_t scan_config = { 0 }; scan_config.channel = 0;//nextchan; // out of 1..13 scan_config.show_hidden = 1; scan_config.scan_type = WIFI_SCAN_TYPE_PASSIVE; // vs WIFI_SCAN_TYPE_ACTIVE; // vs WIFI_SC...