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

VErsion of the main for the darthvader demo.

parent 9c08393e
No related branches found
No related tags found
No related merge requests found
......@@ -9,23 +9,38 @@
int main(void)
{
unsigned char cmd;
int n_servos = 18;
init_cm510(ASYNC);
manager_init(n_servos);
// serial_initialize(57600);
serial_initialize(57600);
action_init();
action_set_page(31);
action_start_page();
// while(is_action_running())
// _delay_ms(100);
_delay_ms(2000);
action_set_page(1);
action_start_page();
while(is_action_running())
_delay_ms(100);
while(1);
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;
}
}
/* 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