To: RoosterRedux
int zr=0; //Row #
int zc=0; // Column #
int zl=0; // string length if needed - ie: 4 for integers
int zt1=0; // temp1
String zs=" "; //string to print
void ezprint(int zc,int zr,String(zs),int zl) {
//zc = column zr = row zs = string variable zl = length
//zl is the length of the print area to clear
lcd.setCursor(zc,zr);
if (zl == 0) zl = zs.length();
for (zt1 = zl; zt1 > 0; zt1--) {
lcd.print(" "); }
lcd.setCursor(zc,zr);
lcd.print(zs);
}
//end ezprint
void setup() {
Serial.begin(9600);
Wire.begin();
lcd.begin(lcdw,lcdh);
lcd.clear();
}
void loop(){
a="Hello";
ezprint(0,0,a,5);
36 posted on
10/21/2016 6:36:49 PM PDT by
Cololeo
To: reed13
39 posted on
10/21/2016 6:41:01 PM PDT by
reed13k
To: Cololeo
That must really helpful to those who don't know what a loop is.
Are trying to spread knowledge (i.e. teach) or just brag about your grasp of it.
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson