To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 10727
10726  |  10728
Subject: 
Re: Visual Basic and RCX
Newsgroups: 
lugnet.robotics
Date: 
Sat, 19 Feb 2000 22:54:15 GMT
Viewed: 
733 times
  
In article <Fq73q1.EMJ@lugnet.com>, "Griff" <entwood@execpc.com> wrote:

Hello;
Does or has anybody in the group used Visual Basic for programing the RCX.
I see a lot of LegoOS and NQC but nothing on Visual Basic, Why?

Thanks
Tim

When you write an RCX program in VB, what you're really doing is
constructing a VB program, that when run on the host computer will call
APIs in the Spirit.ocx module to eventually emit code to the RCX.  There
are several ways to approach this:

1) Write a VB program that treats the RCX as a peripheral.  VB is well
suited for this - in fact this is something that neither NQC or legOS
address.  If you have some complicated application (or even a simple one
with a GUI) that you want running on a PC and it somehow resulting in
action taking place on the RCX, then this is a good way to do it.

2) Write a new development environment to run on the PC that will emit
stand-alone code for the RCX.  This is another thing that VB is good at
and that NQC and legOS don't address (they are development environments
- not tools to create development environments).

3) Create a program that will run on the RCX autonomously.  In this
case, you're just using the VB program to construct the RCX program.
The VB never runs on the RCX.  For example, none of your VB variables,
classes, or methods have any meaning to the RCX.  Nor do any of your
loops, IFs, or other statements.  Spirit.ocx isn't terrible, but it
isn't pretty either.  You need to allocate RCX variables manually and
always refer to them by number.  You can't do tests by typing in
something like "SENSOR_1 < 10"...you need to use arcane contants defined
by spirit.ocx to describe comparing a sensor to a constant value, etc.
In short, spirit.ocx is a pretty tedious way of writing an RCX program.
Its fine if you have nothing else...or in the case of #1 or #2 where the
real goal is a VB program running on the host...but in many other cases
NQC is more convenient and legOS is much more powerful.

Dave Baum

--
reply to: dbaum at enteract dot com



Message is in Reply To:
  Visual Basic and RCX
 
Hello; Does or has anybody in the group used Visual Basic for programing the RCX. I see a lot of LegoOS and NQC but nothing on Visual Basic, Why? Thanks Tim (25 years ago, 19-Feb-00, to lugnet.robotics)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
23 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR