Spotted a mistake?
Dependancies
Pre-requisites
Buy the components
blinky-arduino-esp32c3.ino
// Switch LED between an external LED or the on-board LED // #define LED LED_BUILTIN #define LED 3 void setup() { pinMode(LED, OUTPUT); digitalWrite(LED, LOW); Serial.begin(115200); Serial.println("Start blinky"); } void loop() { ledON(); delay(200); ledOFF(); delay(200); } void ledON() { Serial.println("LED ON"); digitalWrite(LED, LOW); } void ledOFF() { Serial.println("LED OFF"); digitalWrite(LED, HIGH); }
BOARD?=esp32:esp32:esp32c3 PORT?=/dev/cu.SLAB_USBtoUART* BUILD=build .PHONY: default lint all flash clean default: lint all flash clean lint: cpplint --extensions=ino --filter=-legal/copyright *.ino all: arduino-cli compile --fqbn $(BOARD) --output-dir $(BUILD) ./ flash: arduino-cli upload --fqbn $(BOARD) --port $(PORT) --input-dir $(BUILD) clean: rm -r build
A photo of the actual setup.
Ensure the following IDE settings before flashing.
Serial output from the firmware.
The on-board LED LED_BUILTIN is GPIO8 as defined in the pin out.
LED_BUILTIN
GPIO8
Compile and upload the firmware via the Arduino IDE or arduino-cli with Makefile.
arduino-cli
Makefile