#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include <rom/ets_sys.h>
#include "driver/gpio.h"
#define LED_CNT 4
#define STRIPDATALEN ( ( LED_CNT * 3 * 8 ) + 2 )
int ON = 0;
uint16_t indx = 0;
uint8_t stribGRB[ STRIPDATALEN ] = {
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1
};
void app_main() {
printf("Hello, Wokwi!\n");
// gpio_pad_select_gpio ( 13 );
gpio_set_direction ( 13, GPIO_MODE_OUTPUT );
while (true) {
if ( indx == ( STRIPDATALEN - 1 ) ) {
indx = 0;
//TODO: Delay for reset cmd
} else {
}
ON = !ON;
vTaskDelay(1000 / portTICK_PERIOD_MS);
//ets_delay_us(45);
gpio_set_level ( 13, ON );
}
}