Fixed coordiante behaviour of the matrix
This commit is contained in:
+8
-29
@@ -31,7 +31,7 @@ static rmt_transmit_config_t tx_config;
|
||||
static rmt_encoder_handle_t led_encoder = NULL;
|
||||
|
||||
#define RMT_LED_STRIP_RESOLUTION_HZ 10000000 // 10MHz resolution, 1 tick = 0.1us (led strip needs a high resolution)
|
||||
#define RMT_LED_STRIP_GPIO_NUM 8
|
||||
#define RMT_LED_STRIP_GPIO_NUM 0
|
||||
|
||||
extern "C" void app_main(void)
|
||||
{
|
||||
@@ -137,36 +137,15 @@ extern "C" void app_main(void)
|
||||
while (true)
|
||||
{
|
||||
|
||||
// struct tm tm;
|
||||
// time(¤tTime);
|
||||
// localtime_r(¤tTime, &tm);
|
||||
//
|
||||
// LOGGER_INFO("%lld\n\r", currentTime);
|
||||
// LOGGER_INFO("%02i:%02i:%02i\n\r", tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
//
|
||||
// vTaskDelay(300);
|
||||
struct tm tm;
|
||||
time(¤tTime);
|
||||
localtime_r(¤tTime, &tm);
|
||||
|
||||
LOGGER_INFO("%lld\n\r", currentTime);
|
||||
LOGGER_INFO("%02i:%02i:%02i\n\r", tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
|
||||
vTaskDelay(300);
|
||||
|
||||
LOGGER_DEBUG("Enable pixel (%i:%i)", row, colum);
|
||||
LEDMatrix.setPixelValue(row, colum, true);
|
||||
vTaskDelay(100);
|
||||
LEDMatrix.setPixelValue(row, colum, false);
|
||||
if (row<10)
|
||||
{
|
||||
row++;
|
||||
}
|
||||
else
|
||||
{
|
||||
row = 0;
|
||||
if(colum < 2)
|
||||
{
|
||||
colum++;
|
||||
}
|
||||
else
|
||||
{
|
||||
colum = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user