EasyManuals Logo

LEGO MINDSTORMS Robots User Manual

LEGO MINDSTORMS Robots
226 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #146 background image
Page 159
8
Using Spirit.ocx with Visual Basic
In this chapter:
You May Already Have
Visual Basic
About Spirit.ocx
Calling Spirit.ocx Functions
Immediate and Delayed
Gratification
Programs, Tasks, and
Subroutines
Tips
Retrieving the Datalog
Online Resources
Part of the appeal of the programming environments described in Chapter 4, Not Quite C, and Chapter 6, pbFORTH, is that they don't tie you down to using Windows on your development PC.
The programming environment that comes with RIS, RCX Code, is a Windows-only solution, which is distressing to people who prefer other operating systems. Aside from providing better
capabilities than RCX Code, NQC and pbFORTH also allow you to develop RCX software using your operating system of choice.
In this chapter, I'll describe a Windows-only solution— programming your robots using Visual Basic (VB). Visual Basic is a language developed by Microsoft and included with many of their
other products. The link between Visual Basic and your robots is a file called Spirit.ocx, which is installed as part of the standard RIS software. In this chapter, I'll show you how to use Visual
Basic and Spirit.ocx to control and program your robots.
If you are running windows, chances are good that you already have Visual Basic somewhere, as I'll describe in the next section. Because VB is so widespread in the Windows world, I won't
attempt to describe the language itself. There are several good online tutorials, including information and examples at Microsoft's site. (See the "Online Resources" section at the end of this
chapter for references.) Instead, this chapter focuses on how you can use VB to write programs for your RCX.
You May Already Have Visual Basic
Visual Basic is a programming language made by Microsoft. You can purchase it as a separate product. The "Learning Edition" is $109US. A "Professional Edition,"

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the LEGO MINDSTORMS Robots and is the answer not in the manual?

LEGO MINDSTORMS Robots Specifications

General IconGeneral
Product LineLEGO MINDSTORMS
CategoryToy
Age Range10+
Batteries RequiredYes
Memory64 MB RAM, 16 MB Flash
ConnectivityBluetooth, USB
SensorsTouch, Color, Gyro
Battery TypeAA
Interactive FeaturesProgrammable, Remote Control
App CompatibilityiOS, Android
ProcessorARM9
Pieces Count601
Battery Count6
App NameLEGO MINDSTORMS EV3 Programmer App

Related product manuals