Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <wiringPi.h>
- #include <wiringSerial.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdint.h>
- int main() {
- printf("WWelcome to the text program!\n\n");
- int loop = 1;
- //system("python ClearSerial.py");
- int n = serialOpen("/dev/ttyUSB0", 9600);
- printf("ERROR: %i\n", n);
- while(loop) {
- printf("%c", serialGetchar(n));
- //serialPrintf (n, "Hi") ;
- //usleep(1000000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement