Re: [iPAQ] usleep

From: Paulo Marques <pmarques_at_grupopie.com>
Date: Tue, 13 Apr 2004 20:32:14 +0100

Valentin Longchamp wrote:

> Hi,
>
> I would like some information about the usleep fonction : does it work
> with small values ??? Because i've got very funny behaviours with small
> arguments (I mean about 10 microseconds) ... I need that resolution
> because I'm trying to control a robot !!!

If you're trying to control a robot, the best solution is to keep the real-time
stuff on the microcontroller on the robot.

The *normal* architecture would be to have a microcontroller read inputs
(encoders, proximity sensors, touch sensors, etc., etc.) and drive outputs
(motors, servos, lights, etc.). This microcontroller would communicate with the
host application at a reasonable rate (25Hz ~ 100Hz) through the serial port.

The application would process the data from the microcontroller and send new
data for the microcontroller to update the outputs.

It could then use a separate process with lower priority to display nice
graphics and get input from the user on the touch device :)

Why do you need 10 microsecond accuracy on an linux application running on an iPaq?

-- 
Paulo Marques
Software Development Department - Grupo PIE, S.A.
Phone: +351 252 290600, Fax: +351 252 290601
Web: www.grupopie.com
"In a world without walls and fences who needs windows and gates?"
Received on Tue Apr 13 2004 - 19:35:28 EDT

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 18:33:25 EDT