Advertisement
Guest User

Untitled

a guest
Aug 11th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1.  
  2. #include <wiringPi.h>
  3. #include <wiringSerial.h>
  4.  
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include <stdint.h>
  8.  
  9. int main() {
  10.         printf("WWelcome to the text program!\n\n");
  11.         int loop = 1;
  12.         //system("python ClearSerial.py");
  13.         int n = serialOpen("/dev/ttyUSB0", 9600);
  14.  
  15.         printf("ERROR: %i\n", n);
  16.  
  17.         while(loop) {
  18.                 printf("%c", serialGetchar(n));
  19.                 //serialPrintf (n, "Hi") ;
  20.                 //usleep(1000000);
  21.         }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement