2024-01-31 13:05:20 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#include "freertos/task.h"
|
|
|
|
#include "esp_err.h"
|
|
|
|
#include "esp_log.h"
|
|
|
|
#include "esp_check.h"
|
|
|
|
#include "led_matrix.h"
|
|
|
|
|
2024-01-31 17:52:23 +08:00
|
|
|
int line = 16;
|
|
|
|
static const char *TAG = "main";
|
2024-01-31 13:05:20 +08:00
|
|
|
|
|
|
|
void app_main(void)
|
|
|
|
{
|
2024-01-31 17:52:23 +08:00
|
|
|
led_matrix_init();
|
2024-01-31 13:05:20 +08:00
|
|
|
|
2024-01-31 17:52:23 +08:00
|
|
|
// led_matrix_draw_point(16, 48, 0x7);
|
|
|
|
// uint8_t color[line][64];
|
|
|
|
// int i, j, k = 0;
|
|
|
|
// for (i = 0; i < line; i++)
|
|
|
|
// for (j = 0; j < 64; j++)
|
|
|
|
// {
|
|
|
|
// color[i][j] = k++;
|
|
|
|
// k = k % 256;
|
|
|
|
// }
|
|
|
|
// led_matrix_fill_rectangle(0, 0, line, 64, color);
|
|
|
|
// led_matrix_set_brightness(100);
|
|
|
|
// led_matrix_draw_point(16, 30, 0x7);
|
|
|
|
// int brightness = 0;
|
2024-01-31 13:05:20 +08:00
|
|
|
while (1) {
|
2024-01-31 17:52:23 +08:00
|
|
|
// led_matrix_set_brightness(brightness);
|
|
|
|
// brightness = (brightness + 100) % 2000;
|
|
|
|
int i, j, k = 0;
|
|
|
|
for (i =16; i < 32; i++)
|
|
|
|
for (j = 0; j < 64; j++)
|
|
|
|
{
|
|
|
|
vTaskDelay(pdMS_TO_TICKS(100));
|
|
|
|
// if ((i == 16 && j == 26) || (i == 16 && j == 27)) continue;
|
|
|
|
printf("%d,%d\n", i, j);
|
|
|
|
led_matrix_draw_point(i, j, 0x7);
|
|
|
|
}
|
2024-01-31 13:05:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|