Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int tval;
- int ctr;
- void setup(){
- Serial.begin(9600);
- Serial2.begin(2400,SERIAL_8E1);
- }
- void loop(){
- while(Serial2.available()){
- ctr = ctr + 1;
- tval = Serial2.read();
- Serial.print(tval,DEC);
- Serial.print(" ");
- if(ctr >= 19){
- Serial.println();
- ctr = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement