Writing to the log

Resources https://dl.espressif.com/doc/esp-idf/latest/api-reference/system/log.html Writing to log Several macros are available for different verbosity levels static const char *TAG = "My applicaiton thing"; ESP_LOGI(TAG, "Info – something happened\n"); ESP_LOGW(TAG, "Warning – something happened\n"); ESP_LOGE(TAG, "Error – something bad happened\n"); ESP_LOGD(TAG, "Debug – something happened\n"); ESP_LOGV(TAG, "Verbose – something happened\n");  

Read More

printf

#include <stdio.h> Remember to include a terminating "\n" in your printf – stdout doesn't flush until it encounters one by default!!!! printf("Hello world!\n"); printf("%i bytes read : %s\n", rx_length, rx_buffer); printf("data_h: %02x\n", sensor_data_h); printf format codes d or i – int, decimal (base ten) number x or X – int, hexadecimal number.  Also "%02x" to specify length of […]

Read More