Glad that you are covering this. I have been teaching myself the esp32 for about a year now. It is very powerful and a great way to learn lots of different technologies. I use Visual Studio Code for my development as I do not understand the ins and outs of eclipse well enough to get me out of trouble when things go south. To many settings I do not understand. Anyways this should be fun, thanks.
Hello ControllersTech, What should i change to make this code run on my esp32-s3-box in platformio based on Arduino Framework, i've changed uart's pins(#define TXD_PIN (GPIO_NUM_17) #define RXD_PIN (GPIO_NUM_18)) the transmit works fine; even thought i make changes in this task: static void rx_task(void *arg) { static const char *RX_TASK_TAG = "RX_TASK"; Serial.println("enter RXTask"); esp_log_level_set(RX_TASK_TAG, ESP_LOG_INFO); uint8_t *data = (uint8_t *)malloc(RX_BUF_SIZE + 1); while (1) { const int rxBytes = uart_read_bytes(UART_NUM_1, data, RX_BUF_SIZE, 1000 / portTICK_PERIOD_MS); if (rxBytes > 0) { data[rxBytes] = 0; ESP_LOGI(RX_TASK_TAG, "Read %d bytes: '%s'", rxBytes, data); ESP_LOG_BUFFER_HEXDUMP(RX_TASK_TAG, data, rxBytes, ESP_LOG_INFO); // Serial.println((char*)data); } Serial.println((char *)data); } free(data); } I didn't receive any thing on my serial monitor. Thank you in advance.
while receving data from terminal to real term it is working fine but while sending back it is showing an error char sent are not displayed in half duplex can ay please help me to get the output in both directions
Half duplex ? You need to use full duplex for sending and receiving. Half duplex will only send/receive, it can't do both, specially if you are using the default connection (USB). If you want to work with half duplex, then you need to connect via some other means (module), which can switch bwteen tx and rx mode.
I am receiving a data packet ranging from 0 to 255 from serial and using it to drive a motor using PWM. How do I convert the data in the buffer to integer value so that I can pass to ledc_set_duty to change the duty cycle?
ESP32's default baud rate is 115200. If I am changing the baud rate more than that after building the project its again resetting it to 115200. As in config, its the maximum range of baud rate. But the datasheet states it can go till 5mbps. Can anyone help in how to set it? I am using ESP32 DevkitC.
I have a problem. if i send data to esp32 faster than 1000 milliseconds. I'm having trouble reading this fast incoming data. How can i solve this problem
It appears this warning: E (10342) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time: E (10342) task_wdt: - IDLE (CPU 0) E (10342) task_wdt: Tasks currently running: E (10342) task_wdt: CPU 0: uart_tx_task E (10342) task_wdt: CPU 1: IDLE E (10342) task_wdt: Print CPU 0 (current core) backtrace
Glad that you are covering this. I have been teaching myself the esp32 for about a year now. It is very powerful and a great way to learn lots of different technologies. I use Visual Studio Code for my development as I do not understand the ins and outs of eclipse well enough to get me out of trouble when things go south. To many settings I do not understand. Anyways this should be fun, thanks.
you explained in most simple form, comprehensive indeed, easy to be understood. can you do SPI explanation next
Hello how is it possible to open two COM ports I can only open one!
Super sir keep up your good work 👍. Please make a video for event handler and wifi data transmit and receive in ESP32.
Please: how can I work in Debug mode ... and put a break point ?
Hi
How to use esp32-s3 as a uart programmer?
How to configure?
Thanks!!! Would you know how i can turn on a led when i receive a specific word?
you can use string compare (strcmp) function to compare the word with the received work. If the comparison is ok, turn on the LED
How did you do the speaker voice?
how to communicate 2 esp32 using uart ?
hello sir can u teach us how to send and receive data(double/float) from mobile app to esp 32 using bluetooth and webpage
Hello ControllersTech,
What should i change to make this code run on my esp32-s3-box in platformio based on Arduino Framework, i've changed uart's pins(#define TXD_PIN (GPIO_NUM_17)
#define RXD_PIN (GPIO_NUM_18)) the transmit works fine; even thought i make changes in this task:
static void rx_task(void *arg)
{
static const char *RX_TASK_TAG = "RX_TASK";
Serial.println("enter RXTask");
esp_log_level_set(RX_TASK_TAG, ESP_LOG_INFO);
uint8_t *data = (uint8_t *)malloc(RX_BUF_SIZE + 1);
while (1)
{
const int rxBytes = uart_read_bytes(UART_NUM_1, data, RX_BUF_SIZE, 1000 / portTICK_PERIOD_MS);
if (rxBytes > 0)
{
data[rxBytes] = 0;
ESP_LOGI(RX_TASK_TAG, "Read %d bytes: '%s'", rxBytes, data);
ESP_LOG_BUFFER_HEXDUMP(RX_TASK_TAG, data, rxBytes, ESP_LOG_INFO);
// Serial.println((char*)data);
}
Serial.println((char *)data);
}
free(data);
}
I didn't receive any thing on my serial monitor.
Thank you in advance.
Thanks a lot for ur work sir can you post videos to interface ESP32 with UART??
This is what this video is
Sorry my bad, I meant to ask ESP32 interface with stm32?will the same esp8266 Library work with ESP32 also
@@ControllersTech 🤣🤣🤣😂😂😂
while receving data from terminal to real term it is working fine but while sending back it is showing an error char sent are not displayed in half duplex can ay please help me to get the output in both directions
Half duplex ?
You need to use full duplex for sending and receiving. Half duplex will only send/receive, it can't do both, specially if you are using the default connection (USB).
If you want to work with half duplex, then you need to connect via some other means (module), which can switch bwteen tx and rx mode.
I am receiving a data packet ranging from 0 to 255 from serial and using it to drive a motor using PWM. How do I convert the data in the buffer to integer value so that I can pass to ledc_set_duty to change the duty cycle?
Look for atoi() function.
Does anyone know if it is posible to use UART3 in ESP32-WROOM?
I don't think it have uart3. It does have 3 uarts, but they are named as uart0 1 and 2.
ESP32's default baud rate is 115200. If I am changing the baud rate more than that after building the project its again resetting it to 115200. As in config, its the maximum range of baud rate. But the datasheet states it can go till 5mbps. Can anyone help in how to set it? I am using ESP32 DevkitC.
i am getting these error """E (348) uart: uart_set_pin(646): tx_io_num error"""" please if any one know these replay me
I have a problem. if i send data to esp32 faster than 1000 milliseconds. I'm having trouble reading this fast incoming data. How can i solve this problem
Reduce the time interval in esp32_receive function. By default it is set to 1000ms
@@ControllersTech I am using arduinoIDE how can i found this function🙈 i couldnt find
Ask in the arduino support.. This video covers ESP-IDF, so doubts are expected to be related to that.
@@ControllersTech thanks for your attention
It appears this warning:
E (10342) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (10342) task_wdt: - IDLE (CPU 0)
E (10342) task_wdt: Tasks currently running:
E (10342) task_wdt: CPU 0: uart_tx_task
E (10342) task_wdt: CPU 1: IDLE
E (10342) task_wdt: Print CPU 0 (current core) backtrace