123456789101112131415161718192021222324252627282930313233 |
- #include <stdio.h>
- #include "freertos/FreeRTOS.h"
- #include "freertos/task.h"
- #include "driver/gpio.h"
- #include "esp_log.h"
- #include <stdbool.h>
- #include "sdkconfig.h"
- #include "sound.h"
- #include "config.h"
- #include "fridgeDoor.h"
- #include "wifi.h"
- #include "mqtt.h"
- static void configure_led(void)
- {
- ESP_LOGI("LED", "Example configured to blink GPIO LED!");
- gpio_reset_pin(BLINK_GPIO);
- /* Set the GPIO as a push/pull output */
- gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);
- }
- void app_main(void)
- {
- initWifi(); // Init WIFI
- mqtt_init();
- /* Configure the peripheral according to the LED type */
- configure_led();
- setup_photo_sensor();
- initSound();
- }
|