Rev 1464 |
Rev 1478 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#include "kernel/kern.h"
#include "drivers/shark_keyb26.h"
#include "servo.h"
#define N_SEND 100000
int main
() {
TIME seme
;
int res
, i
, err
=0;
int rnd1
, rnd2
;
seme
= sys_gettime
(NULL
);
srand(seme
);
cprintf
("Open Com2\n");
res
= servo_open
(COM2
, 115200);
cprintf
("Res = %d\n",res
);
cprintf
("Servo Turn On 0\n");
res
= servo_turn_on
(COM2
, 0);
cprintf
("Res = %d\n",res
);
sleep
(5);
cprintf
("Servo set angle 45\n");
res
= servo_set_angle_sec
(COM2
, 0, ANGLE2SEC
(45,0,0));
cprintf
("Res = %d\n",res
);
sleep
(5);
servo_close
(COM2
);
sys_end
();
return 0;
}