Library for controlling the LEGO® control lab interface.
What is the control lab?
The control lab, also known as Interface B, was sold by the educational division of LEGO® in the DACTA® product line. It was sold as part of set 9751, part number 70909. It came in both a PC and a Mac version, with different serial cables and software, though the interface boxes are identical.
It has eight controllable outputs and eight sensor inputs, along with another always on output, and a stop button to halt the running program. It is compatible with elements from the 9 volt electric system, including motors, lights and sound blocks. Compatible sensors include touch, temperature, light, and rotation. Many elements from the later MINDSTORMS® RCX product can also be used.
What is brick-control-lab?
brick-control-lab is a Java library to allow programs to control the control lab programmatically. It is not the first piece of hobby software to target working with the control lab, but it is the first with these goals:
- as a library (e.g. no user interface, used by other programs)
- usable from Maven
As software that uses a serial port, usability from Maven was a challenge. The standard Java Communications API (JavaComm) never had a reference implementation that worked on all major platforms. There is an independent serial library, RxTx, but neither it nor JavaComm are usable from Maven, as they have setup procedures that involve adding files into the JRE on the target platform. See Serial Java for more details.
The solution is a relatively new library called Java Simple Serial Connector (jSSC). While the future development of the library is unclear, it has a release on Maven Central that allows cross platform serial port access without any JDK modifications.
To use brick-control-lab with Maven, add the following to your pom:
<dependency> <groupId>org.chabala.brick</groupId> <artifactId>brick-control-lab</artifactId> <version>0.1.0</version> </dependency>
Refer to the Maven generated site for apidocs: https://chabala.github.io/brick-control-lab/
Some good examples of usage can be found in the integration tests.
Prerequisites to build from source
- Java 8
- Maven 3
mvn clean verify to clean, compile, test, and produce the artifact.
Licensed under GNU Lesser General Public License 3.0
LEGO®, DACTA®, TECHNIC®, and MINDSTORMS® are trademarks and/or copyrights of the LEGO Group, which does not sponsor, authorize or endorse this software.