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

75 lines
1.0 KiB
Arduino
Raw Normal View History

2021-10-18 10:35:48 -04:00
//
// FILE: ansi_IO.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo
// DATE: 2021-10-18
// URL: https://github.com/RobTillaart/ANSI
// (c) : MIT
//
#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);
ansi.gotoXY(4, 2);
ansi.print("Username: ");
char c = '\0';
while (c != '\r')
{
if (ansi.available() )
{
c = ansi.read();
if (c != '\r')
{
user += c;
ansi.print(c);
}
}
}
ansi.gotoXY(5, 2);
ansi.print("Password: ");
c = '\0';
while (c != '\r')
{
if (ansi.available() )
{
c = ansi.read();
if (c != '\r')
{
password += c;
ansi.print('.');
}
}
}
ansi.gotoXY(10, 2);
ansi.print(user);
ansi.print("\t\t");
ansi.print(password);
ansi.println("\ndone...");
}
void loop()
{
}
// -- END OF FILE --