
Cube Bits uses three hardware units: a solid cube a 90° degree triangle;
and a table top grid that mirrors what is displayed in the screen. All units are necessary as they are the ones that
create input in the software application. By manipulating a
familiar physical object, the child triggers a direct, unfamiliar effect.
The table top grid is the most important
object of the hardware unit because it tracks the position of the cube and
triangle and sends a signal to the software to create input. When the child places one of the physical objects, either the cube or
the triangle on top of a square on the table top grid and applies pressure
on it, the matching square in the screen´s grid is filled with black color.
Using the cube or the 90° degree triangle fills the
respective shape thus creating a combination of shapes on the screen´s
grid.
Each one of the 20 squares of the table top grid have four touch sensors
embbeded in their surface. Each one of these sensors is programmed to
read the amount of pressure or proximity of the object that is placed on top
of them. This way, the software reads (1) which square of the grid is being
covered by the object and (2) which shape to create in the screen´s grid.
For example, by placing the 90° degree triangle and given that there are four possible representations of this triangle in a square, the object can only cover two of the touch sensors. By an “if then” programming statement, the software can read which side of the triangle is being chosen and consequently which shape to fill in the screen.

The Basic Stamp or microcontroller is programmed in pBasic
which is a version of basic created for coding or programming the
microcontroller. Coding the Stamp can be done in two ways; the
programmer can state the variables in pBasic and determine the
functions of the variables prior to sending them through the serout
pin to the serial port. In another approach, the variables can be
stated in pBasic and sent raw to the serial port. Cube Bits is
programmed to receive raw numeric values from several variables
to the serial port and process its values in Lingo. The only way in
which these variables are read is through the serialXtra. Coding
the serialXtra is then key but can also be complicated because the
programmer first needs to open the serial port and then read the
numbers sent to the buffer. The microcontroller can process these numbers faster than Director can read them, because the buffer
fills up very quickly; therefore there is a meaningful delay in
processing this information in Lingo. A way to solve this problem is
by creating a “repeat while” statement in Lingo so that the serial
port is only read if it is sending any numbers; or by sending a signal
to the microcontroller to ask for numbers.
Because the coding needs testing for the programmer to
troubleshoot this issue, it becomes time consuming and
frustrating, but it can be done.