Hi, Doing a for will not result in a precise timing. I guess your delay is in the main. However in parallel there are a lot of interrupts that take processing power.
So if you need a precise timing use the agenda functions. If you need an approximate timing, yes you can use a for, and just try some numbers to find one close to your goal. Good luck, Gilles ------------------------ Dr. Gilles Caprari GCtronic Sagl, Electronics & Mechatronics web: www.gctronic.com E-mail: [email protected] Post: Via Cassarinetta 2, CH-6900 Lugano, Switzerland Tel: +41 91 630 2149 Fax: +41 43 556 8006 Mobile: +41 78 601 1113 skype: gillescaprari -----Original Message----- From: Sergi Torrellas [mailto:[email protected]] Sent: sabato, 27. novembre 2010 16:16 To: Moh'd Zeyad Cc: e-puck Subject: Re: [E-puck-user] make the motor run for 1 second Hi, You can calculate the value from the specifications of the ePuck. You check the clock frequency and you can make the calculus. Hope that helps, Sergi 2010/11/27 Moh'd Zeyad <[email protected]> Hello there I want to know the value of the delay that will make the motor move at highest speed 15cm/second for 1 second. Ex: long i; e_set_speed_left(1000); e_set_speed_right(1000); for(i=0; i<delay; i++) { asm("nop"); } Thank you in advance. _______________________________________________ E-puck-user mailing list [email protected] https://mail.gna.org/listinfo/e-puck-user -- SERGI TORRELLAS SOCASTRO Desenvolupador R+D Salut M. 616.21.72.97 [email protected] BARCELONA DIGITAL CENTRE TECNOLÒGIC Roc Boronat 117, 5a planta, 08018 Barcelona Tel. +34 93 553 45 40 - Fax. +34 93 553 45 41 <http://www.bdigital.org/> www.bdigital.org <http://www.bdigital.org/Documents/firmes/firma_barcelona_digital.jpg>
_______________________________________________ E-puck-user mailing list [email protected] https://mail.gna.org/listinfo/e-puck-user
