Skip to content
Snippets Groups Projects
Commit faec8d64 authored by Antonio Gabás's avatar Antonio Gabás
Browse files

[bioloid_robot] Added the expansion board firmware for completeness

parent 5186bdc0
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -12,6 +12,7 @@ int main(void) ...@@ -12,6 +12,7 @@ int main(void)
unsigned char cmd; unsigned char cmd;
int n_servos = 18; int n_servos = 18;
init_cm510(ASYNC); init_cm510(ASYNC);
exp_board_init(192);
manager_init(n_servos); manager_init(n_servos);
serial_initialize(57600); serial_initialize(57600);
...@@ -23,23 +24,9 @@ int main(void) ...@@ -23,23 +24,9 @@ int main(void)
while(1) while(1)
{ {
scanf("%c",&cmd);// read a command from the external controller unsigned short int heading = get_avg_heading();
switch(cmd) printf("heading: %d\n",heading);
{ _delay_ms(500);
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;
}
} }
/* if(manager_calibrate_gyro()) /* if(manager_calibrate_gyro())
......
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