Hello everybody
I am wondering if any body in the group tried to get the curves of the
accelerometers based on what is shown in the following link in epuck
website so far
http://www.e-puck.org/index.php?option=com_content&view=article&id=21&Itemid=12
Here is the main part of the code, however I cant find desired result
void main(void){
int i ;
int count= 0;
e_init_port(); // configure port pins
e_start_agendas_processing();
e_init_motors();
e_init_uart1(); // initialize UART to 115200 Kbaud
e_init_ad_scan(ALL_ADC);
e_acc_calibr();
if(RCONbits.POR) { // reset if power on (some problem for few robots)
RCONbits.POR=0;
RESET();
}
e_set_speed_right(70);
e_set_speed_left(70);
while (1){
// at 7kHz
long delay = 0.00014;
for(i=0; i<100; i++){
accx[i]= e_read_acc_x();
accy[i]= e_read_acc_y();
acceleration[i]=e_read_acc();
orientation[i]= e_read_orientation();
wait(delay);
}
for (i= 0 ; i<100; i++){
sprintf(buffer, " %d %f %f %d %d \r\n ",i,
acceleration[i],orientation[i],accx[i],accy[i]);
uart_send_text(buffer);
}
}
}
thank you for your help
Best regards
Mojdeh
*
*
_______________________________________________
E-puck-user mailing list
[email protected]
https://mail.gna.org/listinfo/e-puck-user