Guest User

Untitled

a guest
Mar 22nd, 2016
862
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. int tval;
  3. int ctr;
  4.  
  5.  
  6. void setup(){
  7.   Serial.begin(9600);
  8.   Serial2.begin(2400,SERIAL_8E1);
  9. }
  10.  
  11.  
  12. void loop(){
  13.  while(Serial2.available()){
  14.      ctr = ctr + 1;
  15.      tval = Serial2.read();
  16.      Serial.print(tval,DEC);
  17.      Serial.print(" ");
  18.      if(ctr >= 19){
  19.        Serial.println();
  20.        ctr = 0;
  21.      }
  22.    }
  23. }
RAW Paste Data