Spotted a mistake?
Dependancies
Pre-requisites
Buy the components
debugutils-arduino-esp32c3.ino
#include "Arduino_DebugUtils.h" int i = 0; void setup() { Serial.begin(115200); while (!Serial) { } // DBG_NONE, DBG_ERROR, DBG_WARNING, // DBG_INFO (default), DBG_DEBUG, and DBG_VERBOSE Debug.setDebugLevel(DBG_NONE); // Try out one by one Debug.timestampOn(); } void loop() { DEBUG_ERROR("Error i = %d", i); DEBUG_WARNING("Warning i = %d", i); DEBUG_INFO("INFO i = %d", i); DEBUG_DEBUG("DEBUG i = %d", i); DEBUG_VERBOSE("Verbose i = %d", i); i++; delay(1000); }
BOARD?=esp32:esp32:esp32c3 PORT?=/dev/cu.usbserial-* BUILD=build .PHONY: default lint compile upload clean default: clean lint compile upload clean lint: cpplint --extensions=ino --filter=-legal/copyright *.ino compile: clean lint arduino-cli compile --fqbn $(BOARD) --output-dir $(BUILD) ./ upload: arduino-cli upload --fqbn $(BOARD) --port $(PORT) --input-dir $(BUILD) clean: rm -rf build
A photo of the actual setup.
With the Arduino library DebugUtils, display various levels of print statements.
Debug.setDebugLevel(DBG_NONE);
Debug.setDebugLevel(DBG_ERROR);
Debug.setDebugLevel(DBG_WARNING);
Debug.setDebugLevel(DBG_INFO);
Debug.setDebugLevel(DBG_DEBUG);
Debug.setDebugLevel(DBG_VERBOSE);