Skip to content
Snippets Groups Projects
Commit fd4948e3 authored by fortissBot's avatar fortissBot
Browse files

LRF on Arduino Micro

refs 7968
parent 988378fa
No related branches found
No related tags found
No related merge requests found
......@@ -7,16 +7,11 @@ int timeout;
void lrf_init() {
timeout = 0;
/*
char port[] = "/dev/????????";
FILE* fp = popen("dmesg | grep -A 3 \"Arduino Uno\" | grep -o \"ttyACM.\" | tail -n 1","r");
fgets(port+5, sizeof(port)-6, fp);
*/
char port[100];
FILE* fp = popen("ls -d /dev/serial/by-id/* | grep \"Arduino\" | tr -d \"\n\"", "r");
FILE* fp = popen("ls -d /dev/serial/by-id/* | grep \"Arduino_Micro\" | tr -d \"\n\"", "r");
fgets(port, sizeof(port), fp);
printf("lrf port=%s\n", port);
pclose(fp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment