ESP IDF Robot

This commit is contained in:
2024-12-22 11:45:20 -05:00
parent 9703ea7f2b
commit 40ac3e36aa
3 changed files with 5 additions and 1 deletions

View File

View File

@@ -1 +1 @@
9a0c79b0e4d531c8d8edffd14e8bd9a30e1eff80 9703ea7f2b9bf4eaec4b374af1b1e7a6aff5cc80

View File

@@ -38,6 +38,7 @@ static const char *TAG = "ESP IDF Robot";
// Retrieve values from configuration menu // Retrieve values from configuration menu
#define BLINK_GPIO CONFIG_BLINK_GPIO // 10 GPIO of on-board LED #define BLINK_GPIO CONFIG_BLINK_GPIO // 10 GPIO of on-board LED
#define PUSH_BTN_GPIO CONFIG_BUTTON_GPIO // 3 GPIO of on-board push-button #define PUSH_BTN_GPIO CONFIG_BUTTON_GPIO // 3 GPIO of on-board push-button
#define MTR_FL_GPIO CONFIG_MOTOR_FRONT_LEFT_GPIO
#define ESP_INTR_FLAG_DEFAULT 0 #define ESP_INTR_FLAG_DEFAULT 0
@@ -129,6 +130,9 @@ static void configure_button (void) {
} }
static void configure_mcpwm (void) { static void configure_mcpwm (void) {
mcpwm_gpio_init(MCPWM_UNIT_0, MCPWM0A, MTR_FL_GPIO);
mcpwm_config_t mcpwm_config; mcpwm_config_t mcpwm_config;
mcpwm_config.frequency = 4000; mcpwm_config.frequency = 4000;