Translate

quinta-feira, 12 de novembro de 2020

O RCX : aspectos técnicos... (parte VI)

Com este artigo vou tentar dar início a uma visão abrangente sobre a programação do RCX, e de uma forma, a programação para Mindstorms, ou seja tijolos programáveis. A LEGO possuía duas formas de programar o RCX, o RoboLab (nas escolas) e o RCX Code (na linha RIS).

Contudo cedo os entusiastas tentaram ir mais além. A LEGO por fim acaba por disponibilizar o Mindstorms SDK 2.5 onde apresenta  um conjunto de ferramentas que habilitam o programador a criar para os PBricks (Ver artigo anterior neste blogue).

Por estar muito completo vou replicar aqui uma tabela da wikipedia sobre programação para PBricks da LEGO.

With this article I will try to start a comprehensive view on RCX programming, and in a way, programming for Mindstorms, ie programmable bricks. LEGO had two ways to program the RCX, the RoboLab (in schools) and the RCX Code (in the RIS line).

However, enthusiasts soon tried to go further. Finally, LEGO ends up making available the Mindstorms SDK 2.5 where it presents a set of tools that enable the programmer to create for PBricks (See previous article in this blog).

For being very complete I will replicate here a table from wikipedia about programming for LEGO PBricks.


NameDeviceProgram TypeLanguage type(s)NotesLinks
RCXNXTEV3Runs On BrickRemote Control
Actor-LabCustom flowchart-like language
AdaYesAdaRequires nxtOSEK
Ada Interface to MindStormsAda
App InventorYesApp InventorSpecific support for LEGO(tm) MINDSTORMS(tm) NXT sensors and motors
brickOSYesNoNoC/C++website
ChC/C++ InterpreterControl Lego Mindstorms in C/C++ interactively without compilation
clangC, C++
CoderZYesYesNoJavaWorks with Blockly or with Java (using LejOS). Also includes an online 3D simulator[16]website
Cpp4RobotsNoNoYesYesC/C++Cpp4Robots is extension(plugin) for Microsoft Visual Studio environment. This extension allows programming of Lego EV3 in native C/C++ language and in Microsoft Visual Studio development environment. This Cpp4Robots extension works with default firmware in EV3 Brick.website
DialogOSGraphical Flowchart for voice controlled robotsDialogOS combines speech recognition and speech synthesis with robotics, enabling you to build talking robots that react to your voice commands.
EnchantingDrag and drop, similar to NXT-GProgram your robots simply by dragging the line of functions.
EV3BasicNoNoYesYesYesMicrosoft Small Basicwebsite
ev3_scratchYesNoYesScratch (programming language)Scratch code runs in the browser relaying commands to EV3 robot over Bluetooth.
FLL NXT NavigationYesUses NXT-G and .txt files
GCCC/C++Objective-CFortran, Java, Ada, others
GnikrapNoNoYesYesYesJavaScript / Scratch like programmingwebsite
GNU Toolchain for h8300C/C++, ASM
HVMYesDevelopment environment for the Java programming language for the Mindstorms EV3, Eclipse-basedWorks with Java 1.7. Works with the standard Lego firmware. Does not require a microSD card. Requires a wireless bluetooth dongle for the EV3website
Interactive CC-style language.Language developed for the MIT Lego Robot Design Contest
jaraco.nxtYesYesPythonPython modules providing low-level interfaces for controlling a Lego NXT brick via Bluetooth. Also includes code for controlling motors with an Xbox 360 controller using pyglet.
LabVIEWYesYesYesYesNational Instruments LabVIEW visual programming language (G code)Core language used to develop Mindstorms NXT software. Can use available add-on kit to create and download programs to NXT, create original NXT blocks or control robot directly via USB or Bluetooth using NXT fantom.dll
LEGO MINDSTORMS EV3 API for .NETNoNoYesNoYes.NET, WinJS and C++A .NET API for the LEGO MINDSTORMS EV3 brick usable from desktop, Windows Phone and WinRT. With this API, you can connect, control and read sensor data from your LEGO EV3 brick over Bluetooth, WiFi, or USB.website
Lego.NETAnything that can compile to CIL, works best with C#Does not come with a compiler, converts CIL to machine code
Lego::NXTYesNoYesPerlSet of Perl modules providing real-time low-level control of a Lego NXT brick over Bluetooth.
LegoLogPrologUses an NQC program to interpret commands send from the PC running the Prolog code
LegoNXTRemoteYesNoYesObjective-CRemote control program for remotely operating and programming a Lego NXT Brick. Supports NXT 2.0 and 1.0, sensors, all 3 motors, automatic "steering" control, and running preloaded programs.
leJOSYesYesYesYesYesJavaA java based system for advanced programmers can handle most sensors and things like GPS, speech recognition and mapping technology. Can be interfaced with the Eclipse IDE or run from the command line
LestatC++Allows you to control the NXT directly from any C++ program in Linux.
librcxC/C++A library for GCC
Logitech SDKVisual BasicVisual C++Can be combined with an RCX control library such as spirit.ocx from the MindStorms SDK to make use of the Lego Cam
Microsoft Visual Programming Language (VPL)YesNoYesGraphical flowchart, based on .NETWith the Microsoft Robotics Studio, it uses a native NXT program msrs to send and receive messages to and from a controlling program on a computer via Bluetooth
Mindstorms SDKVisual Basic, Visual C++, MindScript, LASMYou do not need VB to use the VB features as MS Office comes with a cut down version of VB for making macros
MonobrickYesYesYesC#.NET 4.5. Firmware running from SD card.website
NQCYesYesNQC, a C-like language
NXT++C++Allows controlling the NXT directly from any C++ program, in Visual Studio, Windows.
NXT_PythonYesNoYesPythonNXT_Python is a package for controlling a LEGO NXT robot using the Python language. It can communicate via USB or Bluetooth.
NXT-PythonYesNoYesPythonBased on NXT_Python, includes additional advanced features, support for around 30 sensors, and multiple brick connection backends. Works on Windows, Linux, Mac.
NXTGCCAssembly, C, makefiles, Eclipse, etc.The first GCC toolchain for programming the Lego Mindstorms NXT firmware.
nxtOSEKC/C++
OCaml-mindstormOCamlModule to control LEGO NXT robots using OCaml through the Bluetooth and USB interfaces.
OnScreenA custom language which can be programmed directly on the RCX
pbForthYesForthNo longer developed.
pbLuaYesAPI for the Lua programming language for the Mindstorms NXT, text-basedpBLua: ... is written in portable C, with minimal runtime requirements; can be compiled on the fly on NXT; is a small, easy to read, and easy to write language; has extensive documentation available online and in dead-tree format, and a very friendly newsgroupwebsite
PBrickDevPBrickDev, a flowchart based language.Has more functionality than the RIS language, such as datalogs and subroutines/multithreading.
PRO-BOTA kind of Visual Basic/spirit.ocx-based languageDesigned for robots which are in contact with the workstation at all times
ProcessingYesJava (Simplified / programmed C-style)Processing (programming language) is an open source programming language and environment for people who want to program images, animation, and interactions. It is used by students, artists, designers, researchers, and hobbyists for learning, prototyping, and production. To control the NXT with Processing you can use the NXTComm Processing library developed by Jorge Cardoso.
QuiteCCA library for use with GCC and comes with GCC for Windows.
RCX CodeYesRCX Code, a custom flowchart-based languageIncluded in the Mindstorms consumer version sold at toystore
ROBOLABYesA flowchart language based on LabVIEWThis is the programming environment offered to schools who use MindStorms, supports the Lego Cam. The programming structure simulates a flowchart design structure almost icon by icon. Therefore, it helps users a great deal in terms of translating from a flowchart design to Robolab icons.
RoboMindSimple educational scripting language available from Arabic to Ukrainian.The RoboMind learning environment allows to quickly develop and test scripts for a virtual robot environment. The scripts can then directly be transferred to a Lego Mindstorms NXT robot. It works on the standard firmware.
RoboRealmA multi-platform language that works with IRobot Roomba, NXT, RCX, VEX, and many other popular robotic sets. This language is also capable for video processing using a webcam, this gives your robot excellent vision since it can filter out certain colors, lock-on to a certain area of color, display variables from the robot or computer, and much more. The software works with keyboard, joystick, and mouse.
ROBOTCYesYesYesYesAn Integrated development environment targeted towards students that is used to program and control LEGO NXTVEXRCX and Arduino robots using a programming language based on the C programming language.ROBOTC gives the ability to use a text-based language based on the C language. It includes built-in debugger tools, as well as (but not limited to) code templates, Math/Trig operations (sin, cos, tan, asin, acos... etc.), user-friendly auto-complete function built into the interface, built-in sample programs. This deserves a special note for its debugging tool. For any developer, you will know how important it is to have a good debugging tool. Among all other robotics programming languages which support Mindstorms platform, RobotC's debugging environment does deserve a special note; although it is not free.
Robotics.NXTYesYesHaskellA Haskell interface over Bluetooth. It supports direct commands, messages and many sensors (also unofficial). It has also support for a simple message-based control of a NXT brick via remotely executed program (basic NXC code included).
ROSLinux based library for writing robots. The stack "nxt" provides interface with the NXT.
ruby-nxtYesYesRubyProvides low-level access to the NXT via Bluetooth as well as some preliminary high-level functionality.
RWTH – Mindstorms NXT ToolboxYesYesMATLABInterface to control the NXT from MATLAB via Bluetooth or USB (open-source).
Simulink (LEGO MINDSTORMS NXT Support)YesSimulinkProvides a one-click rapid programming tool for the NXT. C code is automatically generated from a graphical Simulink model. The code is then deployed and downloaded onto the NXT, from where it can be run. The Mathworks provides an array of graphical blocks that represent the various sensors and actuators that the NXT uses.
SqLegoSqueak
Swift / RobotaryYesYesSwift (programming language)Robotary is a Mac robotics studio that uses the Swift programming language.website
TclRCXYesTcl
Terrapin LogoLOGO
TinySoarSoarAn implementation of the Soar artificial intelligence architecture that runs on the RCX brick. Soar incorporates acting, planning, and learning in a rule-based framework.
TinyVMYesJavaA predecessor to the lejos language. An open source Java based replacement firmware for the Lego Mindstorms RCX microcontroller.
Transterpreter (The)Occam
TuxMinds(Linux) GUI for various distributions, an open source IDE based on Qt. Supports a lot of bots. RCX, NXT and Asuro are predefined.With the XML-based configuration file almost any kind of bot (or microcontroller) can be added. Own equipment can be added in the same manner.
URBI by Gostai for Lego Mindstorms NXTURBI, C++, Java, MatlabEasy to use parallel and event-driven script language with a component architecture and opensource interfaces to many programming languages. It also offers voice/speech recognition/synthesis, face recognition/detection, Simultaneous localization and mapping, etc.
Vision CommandYesRCX CodeThe official programming language for use with the Lego Cam, that allows you to control your robot with color, motion, and flashes of light.
XSLisp

Destas linguagens iremos no próximo artigo falar das mais importantes, nomeadamente NQC e de Dave Baum.

Dave Baum criou uma linguagem de programação para os PBricks da LEGO, o NQC "Not Quite C". 

Cedo Dave Baum envolve-se nos conjuntos da LEGO Robolab, nomeadamente testa o 9725 ainda antes do seu lançamento. O seu envolvimento leva-o, entre outras suas participações, a escrever o livro "Definitive Guide to LEGO MINDSTORMS", editado em 2000.. o livro apresenta-se como um guia não oficial para o LEGO Mindstorms RIS 1.0 e 1.5. O livro, entre outros aspetos possui em anexo o apêndice C e D, o primeiro sobre ferramentas de programação e o segundo sobre NQC. O livro é acompanhado por um CD com exemplos de programação.


Mais tarde, David Baum lança um livro em equipa denominado "Extreme Mindstorms an advanced guide to Lego Mindstorms", trabalho feito decorrente do encontro MindFest. Tendo por base o RCX 2.0, os diversos autores apresentam outras tantas linguagens de programação: Dave Baum o NQC; Ralph Hempel o pbForth e Luis Villa o LegOS. Sobre Hardware há o contributo de Michael Gasperi no fabrico de sensores caseiros.


Relativamente ao NQC, há um aplicativo que programa e controla até em tempo real, os PBricks da LEGO: o Bricx Command Center - BrixCC. Para saber mais a sua página oficial está aqui (clique na Imagem para a aceder):

Dave Baum created a programming language for LEGO PBricks, the NQC "Not Quite C".

Early Dave Baum gets involved in LEGO Robolab sets, namely tests the 9725 even before its launch. His involvement leads him, among other things, to write the book "Definitive Guide to LEGO MINDSTORMS", published in 2000 .. the book presents itself as an unofficial guide for LEGO Mindstorms RIS 1.0 and 1.5. The book, among other aspects, has appendix C and D attached, the first on programming tools and the second on NQC. The book is accompanied by a CD with programming examples.

Later, David Baum releases a team book called "Extreme Mindstorms an advanced guide to Lego Mindstorms", work done as a result of the MindFest meeting. Based on RCX 2.0, the various authors present many other programming languages: Dave Baum or NQC; Ralph Hempel pbForth and Luis villa LegOS. About Hardware there is the contribution of Michael Gasperi in the manufacture of homemade sensors.

Regarding NQC, there is an application that programs and controls even in real time, the LEGO PBricks: the Bricx Command Center - BrixCC. To know more your official page is here (click on the image to access it):


Lá poderá aceder a imenso recursos incluindo o próprio software.

No mesmo site encontra um espaço dedicado especificamente à linguagem NQC (clique na Imagem para a aceder):

There you will be able to access immense resources including the software itself.
On the same site you will find a space dedicated specifically to the NQC language (click on the image to access it):


Por fim, e em jeito de desafio, deixo-vos um link para um site onde um entusiasta de PBricks, conseguiu, com recurso a diversos procedimentos, colocar novamente todo o software dos PBricks a funcionar em windows 10 - 64 bits. Clique na imagem para aceder.

Finally, and as a challenge, I leave you a link to a site where a PBricks enthusiast, using various procedures, managed to get all the PBricks software back to work on Windows 10 - 64 bits. Click on the image to access.



Para os mais entusiastas e em resumo deixo aqui um link para um site (Lego MindStorms with Linux Mini-HOWTO), datado de 2000, onde se orienta o investigador para usar diversas liguagens e em especial, compatíveis com Linux.

For the more enthusiastic and in summary I leave here a link to a website (Lego MindStorms with Linux Mini-HOWTO), dated 2000, where the researcher is guided to use different languages ​​and, in particular, compatible with Linux.

quarta-feira, 11 de novembro de 2020

Mindstorms SDK 2.5 - Recursos de programas e muito mais...

Confesso que não estou muito à vontade para vos falar sobre o Mindstorms Software Developer Kit versão 2.5. Contudo não posso deixar de o referenciar com uma página totalmente dedicada a ele, porque ele o merece. Refiro que consoante vou adquirindo maior confiança em estruturar a minha informação sobre o SDK, farei o que faço em qualquer dos meus artigos anteriores, atualizarei a informação.Não confundir o SDK 2.5 com o Scout SDK, já tratado noutro artigo específico sobre o conjunto 9735.

Este pacote de softwares e de documentos, foi liberado pela LEGO no sentido dos programadores contribuírem para a melhoria e otimização dos tijolos programáveis LEGO (PBricks), como RCX, mas sobretudo Scout, Microscout e Spybotics. Segundo o site (https://www.philohome.com/sdk25/sdk25.htm) a LEGO deixou de dar suporte técnico no seu site em 2008.

Por isso, o site de www.philohome.com e outros, continuam a manter online o Software SDK 2.5.

O que é que ele contém (pequena e reduzida referência - do site já referido): 

Contém várias documentações sobre códigos de byte RCX2 e Spybotics e LASM, bem como documentação, bibliotecas e arquivos de cabeçalho para comunicações entre PC e bloco. Também inclui firmware RCX2 (firm0328.lgo) que oferece mais capacidade ao RCX (até mesmo em versões mais antigas). Possui os executáveis VLLtest VCTest e VBTest e a ferramenta ScripEd, a qual possibilita a programação do RCX2, Scout, MicroScout e Spybot.

Contudo como há programadores interessados, aqui fica o link para fazerem download.


I confess that I am not very comfortable talking about the Mindstorms Software Developer Kit version 2.5. However, I can't help but reference him with a page totally dedicated to him, because he deserves it. I mention that as I gain more confidence in structuring my information about the SDK, I will do what I do in any of my previous articles, I will update the information.Do not confuse SDK 2.5 with Scout SDK, already dealt with in another specific article on the set 9735.

This software and document package was released by LEGO in order for programmers to contribute to the improvement and optimization of LEGO programmable bricks (PBricks), such as RCX, but above all Scout, Microscout and Spybotics. According to the website (https://www.philohome.com/sdk25/sdk25.htm) LEGO stopped providing technical support on its website in 2008.

For this reason, the website www.philohome.com and others continue to keep the SDK 2.5 Software online.

What does it contain (small and reduced reference - from the website already mentioned):

It contains several documentation about the RCX2 byte codes and Spybotics and LASM, as well as documents, libraries and header files for communications between PC and block. It also includes RCX2 firmware (firm0328.lgo) that gives the RCX more capacity (even in older versions).It has the VLLtest VCTest and VBTest executables and the ScripEd tool, which allows the programming of RCX2, Scout, MicroScout and Spybot.

However, as there are interested programmers, here is the link to download it.



A imagem que se segue reproduz o conteúdo do ficheiro readme.

The following image reproduces the contents of the readme file.




domingo, 8 de novembro de 2020

9735 - O Robotics Discovery Set , o "big brother" do RCX - o Scout

Em 1999, e no sentido de tornar a programação acessível a todos sem intermédio de um computador, foi criado o Robotics Discovery Set, o qual possuía um tijolo programável através de botões. O tijolo azul (o Scout) tinha diversas funcionalidades e possuía sensores incorporados (consultar folheto fim deste artigo). O seu écran possibilitava uma leitura fácil. Foi vendido com 3 livros "constructopedia", e um folheto de como utilizar. O software Robolab 2.5 ou superior, possibilitava a sua programação, e o RCX 2.0 interagia com ele, por infravermelhos. O telecomando da LEGO também e de um modo muito particular recorria de muitas funcionalidades deste tijolo programável.. Era composto por 387 peças.O Scout podia através da sua VLL enviar comandos para o MicroScout, no modo P.

In 1999, in order to make programming accessible to everyone without a computer, the Robotics Discovery Set was created, which had a programmable brick via buttons. The blue brick had several functionalities and had built-in sensors. Its screen made it easy to read. It was sold with 3 books "constructopedia". Robolab 2.5 or higher software enabled its programming, and the RCX 2.0 interacted with it, via infrared. The LEGO remote control also, in a very particular way, used many of the features of this programmable brick. It consisted of 387 pieces.Scout could, through its VLL, send commands to MicroScout, in P mode.



a caixa 9735


a caixa 9735 (versão japonesa)



uma construção


constructopedia 1 - clique na imagem
(4129403)


constructopedia 2 - clique na imagem
(4129405)


constructopedia 3 - clique na imagem
(4129407)




as três constructopedias, em japonês 


o folheto - clique na imagem
(4129409)



o folheto em japonês (frente e verso)
(4129410)


A LEGO disponibilizou desde o início o SDK do Scout, ou seja o Software Developers Kit e Scout Tool Help (este último associado a um software). Disponibilizo ambos documentos em baixo.


Software Developers Kit



O Scout Tool Help

Aqui pode encontrar o "scout tools", a aplicação.

O Scout pode ser controlado pelo software ROBOLAB (2.5.1 ou superior), e através deste controlar o microscout e o code pilot. Fica a qui o link para uma documento que coleta os comandos do robolab para Scout.

A título de exemplo das potencialidades de comunicação do Scout, um pequeno vídeo onde o Scout, controlado pelo remote control da Lego Mindstorms (C em frente e para trás), emite VLL que aciona motor em Microscout e em CodePilot.

The Scout can be controlled by the ROBOLAB (2.5.1 or higher) software, and through this control the microscout and code pilot. Here is the link to a document that collects robolab commands for Scout.

As an example of the Scout's communication potential, a short video where the Scout, controlled by the Lego Mindstorms remote control (C front and back), emits VLL that activates a motor in Microscout and CodePilot.


 




O Scout visto por dentro


Curiosidades: A patente feita pela Interlego AG, nos EUA 
(clique na imagem para aceder à sua totalidade)

Curiosidades sobre produtos não comercializados: Uma bola de futebol (com infravermelhos) que foi criada para o RoboCup'99 que ocorreu em Estocolmo. Poderia ser "jogada" com o Scout.
A patente feita pela Interlego AG, nos EUA 
(clique na imagem para aceder à sua totalidade)




Para saber mais, consulte o Mindstorms Scout SDK (clique aqui).

To learn more, see the Mindstorms  Scout SDK  (click here).


(atualização em 23-03-2025)