Advertisement
baldengineer

lcd / serial

Oct 22nd, 2011
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <LiquidCrystal.h>
  2. LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
  3.  
  4. byte byteA;
  5.  
  6. void setup() {
  7.         Serial.begin(19200);
  8.  
  9.         lcd.begin(16,2);
  10.         lcd.setCursor(0,0);
  11.         lcd.print("lv1a");
  12.         }
  13.  
  14.  
  15.  
  16. void loop(){
  17.     if (Serial.available > 0) {
  18.             lcd.setCursor(0,1);
  19.             byteA = Serial.read();
  20.             lcd.print(byteA, HEX);
  21.     }
  22. }
  23.  
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement