GY-63_MS5611/libraries/ANSI/examples/ansi_IO/ansi_IO.ino

71 lines
967 B
Arduino
Raw Normal View History

2021-10-18 10:35:48 -04:00
//
// FILE: ansi_IO.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// URL: https://github.com/RobTillaart/ANSI
#include "ansi.h"
ANSI ansi(&Serial);
String user = "";
String password = "";
2021-12-13 10:45:59 -05:00
2021-10-18 10:35:48 -04:00
void setup()
{
Serial.begin(115200);
ansi.clearScreen();
ansi.print("ANSI_LIB_VERSION: ");
ansi.print(ANSI_LIB_VERSION);
2023-02-27 05:33:43 -05:00
ansi.gotoXY(2, 4);
2021-10-18 10:35:48 -04:00
ansi.print("Username: ");
char c = '\0';
while (c != '\r')
{
if (ansi.available() )
{
c = ansi.read();
if (c != '\r')
{
user += c;
ansi.print(c);
}
}
}
2023-02-27 05:33:43 -05:00
ansi.gotoXY(2, 5);
2021-10-18 10:35:48 -04:00
ansi.print("Password: ");
c = '\0';
while (c != '\r')
{
if (ansi.available() )
{
c = ansi.read();
if (c != '\r')
{
password += c;
ansi.print('.');
}
}
}
2023-02-27 05:33:43 -05:00
ansi.gotoXY(2, 10);
2021-10-18 10:35:48 -04:00
ansi.print(user);
ansi.print("\t\t");
ansi.print(password);
ansi.println("\ndone...");
}
void loop()
{
}
2023-02-27 05:33:43 -05:00
// -- END OF FILE --