ESP IDF Robot

This commit is contained in:
2024-12-22 12:38:14 -05:00
parent f862e3e83a
commit 318f46dfd0
4 changed files with 162 additions and 3 deletions

View File

@@ -24,12 +24,12 @@ static const char *TAG = "ESP IDF Robot";
// LED
#define LEDC_TIMER LEDC_TIMER_0
#define LEDC_MODE LEDC_LOW_SPEED_MODE // LEDC_LOW_SPEED_MODE
#define LEDC_MODE LEDC_HIGH_SPEED_MODE // LEDC_LOW_SPEED_MODE
#define LEDC_OUTPUT_IO (5) // Define the output GPIO
#define LEDC_CHANNEL LEDC_CHANNEL_0
#define LEDC_DUTY_RES LEDC_TIMER_10_BIT // Set duty resolution to 13 bits
#define LEDC_DUTY (2048) // Set duty to 50%. (2 ** 13) * 50% = 4096 1024
#define LEDC_FREQUENCY (2000) // For LED the freuqncy of 500Hz seemed to be sufficient. // Frequency in Hertz. For DC motor, set frequency at 5 kHz
#define LEDC_FREQUENCY (200) // For LED the freuqncy of 500Hz seemed to be sufficient. // Frequency in Hertz. For DC motor, set frequency at 5 kHz
/* Use project configuration menu (idf.py menuconfig) to choose the GPIO to blink,
or you can edit the following line and set a number here.