Introduction
Overview
Tux Droid is a desktop companion i.e. a funny kind of man-to-machine interface ... The design team has several ideas about what one can do with such a interface but the only thing we are sure about is that Tux Droid Builders (you!) can imagine and create much more. In order to understand "how it works", this section is sketching the internal structure of Tux Droid while providing links to go deeper into detail.
Parts of the Tux Droid System
Tux Droid system is a mix of hardware and software. The hardware side includes:
- Tux Droid itself: the robot part of the system with actuators, sensors, audio in and audio out features. It includes a wireless link connecting it to Tux Dongle...
- Tux Dongle : the small fish is an USB device linking the computer and Tux Droid . It is basically a bridge between the radio protocol and the USB protocol.

The software side of Tux has the following layers:
- a hardware interface managing low level access to the Tux controls and audio streams
- a set of software services allowing high level communication with applications
- the applications software itself

The data exchange between the computer and Tux Droid is achieved through two links:
- A wireless RF link allowing full duplex audio streaming and control data transfer between Tux Droid and the dongle
- A wired USB link allowing exchange between computer and the dongle. It supports 2 USB isochronous endpoints for bidirectional audio streaming and 2 USB interrupt endpoints for control data transfer
The diagram sketches exchanges between the computer and Tux Droid. Because of the different nature and processing requirements we make a clear cut between "audio streams" (wide lines) and "control data" (tiny lines) .
Tux Droid interacting with the external environment
Tux Droid interacts with the environment in various ways:- Its actuators broadcast information to the environment. They
include mechanical movement (3 independent motors), lighting (2
independent blue LED's) and infrared emitting. Actuations are launched
by commands received through the RF link. Tux Droid is also able to
exhibit stand alone behavior. You can program or modify in every way
you want.
- The sensors receive information from the external environment. They include various switches (head and wings), a light sensor and infrared receiver. The status of these sensors are available inside Tux Droid. They are sent to computer through the RF link on a regular basis.
- Tux Droid comes with an I2C bus. Here you can
connect any kind of I2C sensor or actuator to Tux Droid. And all
processors in Tux Droid can be reprogrammed through this bus.
-
Audio-Out: sounds can be generated by Tux Droid in various ways. Tux may simply play an audio stream coming from the computer or produce sounds that ari internally stored in the sound flash memory.
- Audio-In: Tux Droid is able to sample (8 KHz, 8 bits) sounds
with its microphone and to stream those to the computer via the RF link.
Tux Droid Software Data ...
A typical application using Tux Droid has to work with audio streams data and control data. Plugging the Tux Dongle in the USB port opens two bidirectional channels: one for audio streams, the other one for sending command data and receiving status data. These channels are configured in such a way that
-
audio streams are available for applicationsĀ through ALSA and the snd_usb_audio driver. Tux Droid appears as a sound card supporting ALSA or OSS. Practically speaking, any application using audio features will be able to use Tux Droid as an audio device and can play or record sounds.
-
control data can be sent or received directly with libusb (http://libusb.sourceforge.net/). As it is a bit tricky to use libusb for Tux Droid control, applications may access Tux Droid through a service called "Tux Droid Daemon". They simply use TCP/IP messages containing the controls. The daemon converts TCP/IP messages into libusb calls; it's in charge of guaranteeing timing requirements and providing polling features for transparent communication with Tux Droid.
