2021-01-29 06:31:58 -05:00
|
|
|
//
|
|
|
|
// FILE: ansi_clearline.ino
|
|
|
|
// AUTHOR: Rob Tillaart
|
|
|
|
// PURPOSE: demo
|
|
|
|
// URL: https://github.com/RobTillaart/ANSI
|
|
|
|
|
2021-10-18 10:35:48 -04:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
#include "ansi.h"
|
|
|
|
|
|
|
|
ANSI ansi(&Serial);
|
|
|
|
|
|
|
|
|
|
|
|
void setup()
|
|
|
|
{
|
|
|
|
Serial.begin(115200);
|
|
|
|
|
|
|
|
ansi.clearScreen();
|
|
|
|
for (int i = 0; i < 20; i++)
|
|
|
|
{
|
|
|
|
ansi.println("1234567890123456789012345678901234567890");
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
delay(1000);
|
|
|
|
|
|
|
|
for (int i = 0; i < 8; i++)
|
|
|
|
{
|
2023-02-27 05:33:43 -05:00
|
|
|
ansi.gotoXY(4 + 2 * i, i);
|
2021-01-29 06:31:58 -05:00
|
|
|
ansi.clearLine(ansi.toEnd);
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
delay(1000);
|
2021-10-18 10:35:48 -04:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
for (int i = 12; i < 20; i++)
|
|
|
|
{
|
2023-02-27 05:33:43 -05:00
|
|
|
ansi.gotoXY(4 + 2 * i, i);
|
2021-01-29 06:31:58 -05:00
|
|
|
ansi.clearLine(ansi.toStart);
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
delay(1000);
|
|
|
|
|
|
|
|
for (int i = 9; i < 11; i++)
|
|
|
|
{
|
2023-02-27 05:33:43 -05:00
|
|
|
ansi.gotoXY(4 + 2 * i, i);
|
2021-01-29 06:31:58 -05:00
|
|
|
ansi.clearLine(ansi.entireLine);
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
delay(1000);
|
|
|
|
}
|
|
|
|
|
2021-12-13 10:45:59 -05:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
void loop()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-12-13 10:45:59 -05:00
|
|
|
|
2023-02-27 05:33:43 -05:00
|
|
|
// -- END OF FILE --
|
2021-12-13 10:45:59 -05:00
|
|
|
|