Advertisement
baldengineer

proper for loop

Mar 22nd, 2015
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <UTFT.h>
  2.  
  3. extern uint8_t SmallFont[];
  4.  
  5. UTFT myGLCD(ITDB32WC,19,18,17,16);  
  6.  
  7. void setup()
  8. {
  9.   randomSeed(analogRead(0));
  10.   for(int p=2;p<10;p++)
  11.   {
  12.     pinMode(p,OUTPUT);
  13.   }
  14.  
  15.   for(int x=A0; x<A5; x++) {
  16.     pinMode(x,OUTPUT);
  17.     digitalWrite(x, HIGH);
  18.   }
  19.  
  20.   myGLCD.InitLCD();
  21.   myGLCD.setFont(SmallFont);
  22.   myGLCD.clrScr();
  23.   myGLCD.setColor(255, 255, 255);
  24.   myGLCD.setBackColor(0, 0, 0);
  25.  
  26. }
  27.  
  28. void loop()
  29. {
  30.   myGLCD.print("Test screen", CENTER, 93);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement