mirror of
https://gitlab.com/fabinfra/fabhardware/fablight.git
synced 2025-03-13 07:01:49 +01:00
44 lines
844 B
C
44 lines
844 B
C
|
#include <sys/cdefs.h>
|
||
|
#include <stdio.h>
|
||
|
#include <inttypes.h>
|
||
|
#include <esp_err.h>
|
||
|
#include <esp_wifi.h>
|
||
|
#include <esp_event.h>
|
||
|
#include <esp_log.h>
|
||
|
#include <nvs_flash.h>
|
||
|
#include <mqtt_client.h>
|
||
|
#include <esp_crt_bundle.h>
|
||
|
#include <led_strip.h>
|
||
|
#include <esp_timer.h>
|
||
|
#include <driver/gpio.h>
|
||
|
|
||
|
#include "LED_Segments.h"
|
||
|
|
||
|
// Constants
|
||
|
#define LED_STRIP_RMT_RES_HZ (10 * 1000 * 1000)
|
||
|
#define TOPIC_BUFFER_SIZE 50
|
||
|
|
||
|
// Global variables
|
||
|
LED_Segments segments[CONFIG_LED_SEGMENT_COUNT];
|
||
|
|
||
|
esp_mqtt_client_handle_t mqtt_client;
|
||
|
led_strip_handle_t led_internal;
|
||
|
led_strip_handle_t led_segments;
|
||
|
|
||
|
// LED Task
|
||
|
void vTaskLED( void * pvParameters )
|
||
|
{
|
||
|
for( ;; )
|
||
|
{
|
||
|
// Task code goes here.
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void app_main(void)
|
||
|
{
|
||
|
TaskHandle_t xHandle_LED = NULL;
|
||
|
xTaskCreate( vTaskLED, "LED", 200, NULL, tskIDLE_PRIORITY, &xHandle_LED );
|
||
|
|
||
|
|
||
|
|
||
|
}
|