Search found 13 matches

by Troy Mitchell
Mon Sep 02, 2024 12:54 pm
Forum: ESP-IDF
Topic: I can not control the gpio 11
Replies: 1
Views: 1026

I can not control the gpio 11

Chip: esp32c3 FN4 I set gpio11 to switch the level once every second, but in the end I only got a voltage of about 3v3 to 3v0. I think the code is ok because I changed 11 to 21 (21 is connected to an led) and everything works fine. BTW: On the chip, gpio11 is the VDD_SPI identifier. Code: ```c gpio_...
by Troy Mitchell
Sat Aug 31, 2024 4:24 am
Forum: ESP-IDF
Topic: esp32c3 cannot control gpio21
Replies: 3
Views: 890

Re: esp32c3 cannot control gpio21

boarchuz wrote:
Fri Aug 30, 2024 11:00 am
gpio_config_t is not initialised

Also you config(21) and then set_level(11)
No, I just posted the wrong code, and I actually control 21.
I can see that the voltage jumps at 3 to 3.3v, and if I don't control 21, he won't jump.
by Troy Mitchell
Fri Aug 30, 2024 9:17 am
Forum: ESP-IDF
Topic: esp32c3 cannot control gpio21
Replies: 3
Views: 890

Re: esp32c3 cannot control gpio21

Chip: esp32c3 FN4 I set gpio21 to switch the level once every second, but in the end I only got a voltage of about 3v3 to 3v0. I think the code is ok because I changed 21 to 11 (11 is connected to an led) and everything works fine. Code: ```c gpio_config_t cfg; cfg.mode = GPIO_MODE_OUTPUT; cfg.pull...
by Troy Mitchell
Fri Aug 30, 2024 9:15 am
Forum: ESP-IDF
Topic: esp32c3 cannot control gpio21
Replies: 3
Views: 890

esp32c3 cannot control gpio21

Chip: esp32c3 FN4 I set gpio21 to switch the level once every second, but in the end I only got a voltage of about 3v3 to 3v0. I think the code is ok because I changed 21 to 11 (11 is connected to an led) and everything works fine. Code: ```c gpio_config_t cfg; cfg.mode = GPIO_MODE_OUTPUT; cfg.pull_...
by Troy Mitchell
Wed Aug 21, 2024 9:10 am
Forum: ESP-IDF
Topic: Dynamic mesh root node switching
Replies: 0
Views: 541

Dynamic mesh root node switching

Since I have enabled the dynamic allocation network,how should I know that the root node has been switched so that I can do some processing for the old root node and make the new root node take some actions. Which event can the old root node use to know that it is about to be switched? Through which...
by Troy Mitchell
Mon Aug 19, 2024 12:45 pm
Forum: ESP-IDF
Topic: The issue of sending ESP32 WiFi mesh to the root node
Replies: 2
Views: 797

Re: The issue of sending ESP32 WiFi mesh to the root node

The error code 4008 corresponds to ESP_ERR_MESH_ARGUMENT, indicating that one or more of the arguments passed to esp_mesh_send are invalid. Check the mesh_data_t Structure: Ensure that the data.data is not NULL and that data.size is correctly set. The mesh network should be correctly set up and the...
by Troy Mitchell
Mon Aug 19, 2024 8:54 am
Forum: ESP-IDF
Topic: ESP32 WiFiMesh sending problem
Replies: 2
Views: 793

Re: ESP32 WiFiMesh sending problem

In the ESP-MESH network, devices can communicate with each other by simply specifying the destination address when using the esp_mesh_send function. The ESP-MESH library handles the routing automatically. Device C or D sends the message to device B. Device B forwards the message to device A. Get it...
by Troy Mitchell
Sat Aug 17, 2024 9:22 am
Forum: ESP-IDF
Topic: The issue of sending ESP32 WiFi mesh to the root node
Replies: 2
Views: 797

The issue of sending ESP32 WiFi mesh to the root node

I sent a message to the root node in this way from the child node: ```c++ static uint8_t tx_buf[10]; for(int i = 0; i < 10; i++) { tx_buf = i; } mesh_data_t data; data.data = tx_buf; data.size = sizeof(tx_buf); data.proto = MESH_PROTO_BIN; data.tos = MESH_TOS_P2P; esp_mesh_send(nullptr, &data, MESH_...
by Troy Mitchell
Sat Aug 17, 2024 6:14 am
Forum: ESP-IDF
Topic: ESP32 WiFiMesh sending problem
Replies: 2
Views: 793

ESP32 WiFiMesh sending problem

If my current mesh network is like this: A | | B / \ C D If device C or device D wants to send a message to device A, can they just use the `esp_mesh_send` function and write the address of device A as the first parameter? Then the mesh library will send it to B, and then B will transfer it to A, bu...
by Troy Mitchell
Sat Aug 17, 2024 6:07 am
Forum: ESP-IDF
Topic: The life cycle of data arriving via MQTT_EVENT_DATA
Replies: 4
Views: 730

Re: The life cycle of data arriving via MQTT_EVENT_DATA

ESP_Sprite wrote:
Sat Aug 17, 2024 5:45 am
Ah, gotcha. Generally you cannot assume the lifetime of any data passed into a callback exists past the duration of a callback; the documentation will explicitly mention it if it does persist longer.
Got it! Thanks for ur response.

BEST REGARD.