Skip to content

R7J7R7M/VS_code-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

ESP32-S3 LED Blink Example

This repository contains a minimal example that toggles a GPIO pin on the ESP32-S3 to blink an LED. The code in blink.c uses the ESP-IDF API when compiled for the microcontroller and provides simple stubs so it can be compiled on a host machine for syntax checking.

Hardware

  • ESP32-S3 development board
  • LED connected to GPIO8 (adjust BLINK_GPIO in blink.c if needed)

Building for ESP32-S3

  1. Install ESP-IDF and set up the environment.

  2. Configure the target and build:

    idf.py set-target esp32s3
    idf.py build
  3. Flash the firmware to your board and monitor serial output:

    idf.py -p /dev/ttyUSB0 flash monitor

The LED on GPIO8 will blink at a 1 Hz rate.

Host Compilation (for syntax check)

You can compile the example on a regular computer to verify that the code builds:

gcc -fsyntax-only blink.c

This uses stub functions in place of ESP-IDF's hardware drivers.

About

This repo is opened to learn how to use VS code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages