problem with LED
Posted: Mon Nov 04, 2024 4:43 pm
I'm trying to turn on the built in LED on ESP32-C3-DevKitM-1 but it does not works.
What I made wrong?
What I made wrong?
Code: Select all
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "driver/gpio.h"
#define GPIO_BIT_MASK ((1ULL<<GPIO_NUM_8) | (1ULL<<GPIO_NUM_9))
void app_main()
{
gpio_config_t io_conf;
io_conf.intr_type = GPIO_INTR_DISABLE;
io_conf.mode = GPIO_MODE_OUTPUT;
io_conf.pin_bit_mask = GPIO_BIT_MASK;
io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
io_conf.pull_up_en = GPIO_PULLUP_DISABLE;
gpio_config(&io_conf);
gpio_set_level(GPIO_NUM_8, 1);
}