MSWBrick - Using the Lego RCX Brick with MSW Logo - Jim Fuller, March 2003
|
The information below outlines the merging of Lego RCX ("Yellow Brick") Interfacing with MSW Logo. This technique is based on the work of Daniel Berger who has written dedicated routines to control the RCX. Daniel has made his C++ code available at: http://www.kyb.tuebingen.mpg.de/bu/people/berger/mindstorms.html It is NOT based on Lego's SPIRIT.OCX, or the latest Lego SDK using GhostAPI.dll The approach used is to construct a DLL that interfaces with Daniel's functions and is accessible from MSW Logo using DLLLOAD and DLLCALL. |
|
The Calling 'Chain'
The new DLL ("mswbrick.dll") has been written to sit between Daniel Berger's code and MSW Logo. MSW Logo calls mswbrick.dll which in turn accesses the functions defined in rcx.cpp This chain is necessary because MSW logo can not call rcx.cpp directly. It should be noted that all commands are in "immediate" mode. The brick is under the direct control of MSW Logo at all times. If it moves out of range of the Tower you will lose control of the brick. If the motors are on, for example, they will stay on! |
Project Development History
Creating the DLLs with
Microsoft Visual C++
Working with MSW Logo
Download the COM1 DLL
Download the COM2 DLL
Download the USB DLL
Download Sample MSW Logo Code
| REMEMBER
... I fell for the classic trap when my RCX batteries needed charging. After re-charging, I assembled everything again, connected to the computer and .... NOTHING!! It was several hours before I realised what was wrong. I had to download the Firmware for the DLL to work!!
ALSO ... |
| Special thanks to Chris Lindsay for all
the C++ advice. VERY Special thanks to Daniel Berger for his fantastic rcx.cpp code. |