From faec8d64f3edde74fc5d0cdb0437e262e29dc19a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antoni=20Gab=C3=A1s?= <agabas@iri.upc.edu>
Date: Thu, 31 Mar 2016 15:03:43 +0000
Subject: [PATCH] [bioloid_robot] Added the expansion board firmware for
 completeness

---
 motion/src/examples/main.c | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/motion/src/examples/main.c b/motion/src/examples/main.c
index 49d5cb1..c52fc01 100644
--- a/motion/src/examples/main.c
+++ b/motion/src/examples/main.c
@@ -12,6 +12,7 @@ int main(void)
   unsigned char cmd;
   int n_servos = 18;
   init_cm510(ASYNC);
+  exp_board_init(192);
 
   manager_init(n_servos);
   serial_initialize(57600);
@@ -23,23 +24,9 @@ int main(void)
 
   while(1)
   {
-    scanf("%c",&cmd);// read a command from the external controller
-    switch(cmd)
-    {
-      case 'l': action_set_page(56);
-                action_start_page();
-                printf("l");
-                break;
-      case 'r': action_set_page(70);
-                action_start_page();
-                printf("r");
-                break;
-      case 's': action_stop_page();
-                printf("s");
-                while(is_action_running());
-                printf("d");
-                break;
-    }
+     unsigned short int heading = get_avg_heading();
+     printf("heading: %d\n",heading);
+     _delay_ms(500);
   }
 
 /*  if(manager_calibrate_gyro())
-- 
GitLab