Alphalem OS

Alphalem OS is a linux distribution built specifically for robots developed around Rex. At its core is the Alphalem Development Environment (ADE) which consists of helpful scripts, sample programs written in C++, an API for communicating with devices connected to Rex over its I2C Expansion Ports, and a process management system for running multiple robot control programs (Tasks) in parallel. Alphalem OS also includes built-in drivers for a set of devices that we've hand picked as being the most useful for robots.

Process Management System

ADE's process management system is centered around the concept of "Tasks", which resemble Arduino's "Sketches". A Task Definition is written in such a way that it encapsulates a specific process during a robot's runtime. When a user has written multiple Task Definitions, the Tasks can be launched by the Master Control Program (MCP), essentially a scheduling daemon that facilitates interaction between Tasks in a common space called a Wire.

Here's a simple example. A user has written two Tasks for the robot, a Face Detection Task and a Servo Motor Task with a primary device associated with each, a camera and a servo, respectively. The Face Detection Task will continuously publish the number of detected faces to the Wire residing in the MCP and the Servo Motor Task will coordinate the robot's movement according to the values that are being read from the Wire. Once both of these Tasks are launched by MCP, the interaction is handled automatically and in parallel.

Arduino Control

With Alphalem OS installed, Rex can easily pass messages to and from an attached Arduino if the microcontroller includes a bit of I2C code from the Wire library. The skeleton Sketch for reading a generic sensor value from the Arduino to Rex can be copied from here.

This is just meant to give you an idea of how the communication works. We'll be adding more information and examples when we have them.