mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 10:50:52 +00:00
ESP IDF Robot
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
static const char *TAG = "ESP IDF Robot";
|
static const char *TAG = "ESP IDF Robot";
|
||||||
|
|
||||||
#define PUSH_BTN_GPIO 3 // GPIO of on-board push-button
|
#define PUSH_BTN_GPIO 3 // GPIO of on-board push-button
|
||||||
#define GPIO_OUTPUT_PIN_SEL ((1ULL<<PUSH_BTN_GPIO))
|
#define GPIO_INPUT_PIN_SEL ((1ULL<<PUSH_BTN_GPIO))
|
||||||
#define ESP_INTR_FLAG_DEFAULT 0
|
#define ESP_INTR_FLAG_DEFAULT 0
|
||||||
static QueueHandle_t gpio_evt_queue = NULL;
|
static QueueHandle_t gpio_evt_queue = NULL;
|
||||||
|
|
||||||
@@ -132,6 +132,9 @@ void app_main(void)
|
|||||||
io_conf.pull_up_en = 1;
|
io_conf.pull_up_en = 1;
|
||||||
gpio_config(&io_conf);
|
gpio_config(&io_conf);
|
||||||
|
|
||||||
|
io_conf.intr_type = GPIO_INTR_NEGEDGE;
|
||||||
|
io_conf.pin_bit_mask = GPIO_INPUT_PIN_SEL;
|
||||||
|
|
||||||
configure_button();
|
configure_button();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
Reference in New Issue
Block a user