From fd4948e32dd8f6dd0062bcfba893c716715aca71 Mon Sep 17 00:00:00 2001
From: Bianka Forkel <noreply@fortiss.org>
Date: Fri, 21 Jul 2017 15:56:49 +0000
Subject: [PATCH] LRF on Arduino Micro refs 7968

---
 .../trunk/lib/src/LaserRangeFinder.c                     | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/org.fortiss.af3.platform.raspberry/trunk/lib/src/LaserRangeFinder.c b/org.fortiss.af3.platform.raspberry/trunk/lib/src/LaserRangeFinder.c
index c1327b18..6a73d303 100644
--- a/org.fortiss.af3.platform.raspberry/trunk/lib/src/LaserRangeFinder.c
+++ b/org.fortiss.af3.platform.raspberry/trunk/lib/src/LaserRangeFinder.c
@@ -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);
 
-- 
GitLab