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 / 24237
24236  |  24238
Subject: 
Re: Two Usb towers
Newsgroups: 
lugnet.robotics
Date: 
Mon, 15 Aug 2005 15:31:42 GMT
Viewed: 
969 times
  
In lugnet.robotics, Steve Hassenplug wrote:


When you use VB, I assume you have a function something like this to find & open the
port:

--
Public Function FindTower()
    On Error GoTo FindError
    Dim strPort As String
    Set Me.LEGOcom = New LEGOVPBrickLib.VPBrick
    Me.LEGOcom.FindPort strPort
    Me.LEGOcom.Open strPort
    Me.LEGOcom.Monitor True
    Exit Function
FindError:
    If Err.Number = -520093436 Then
        MsgBox "Tower not found"
    Else
        MsgBox "Error (" & Err.Number & ") " & Err.Description
    End If

End Function
--

I decided not to start work on this problem until my second Usb tower arrived.
It came a few days ago and now I've found the time to work on it, but I've hit
another problem.

I haven't got any code like that above, because (as I've only just realised) I'm
not using Ghost.dll but Phantom instead, which is the usb version of Spirit.ocx.
It's been that long since I added it to my program that I'd completely forgotten
I'd done it. The reason I did it was because it was so much simpler to use
Phantom because I already understood Spirit.ocx, rather than learn how to use
Ghost as well.

So now it turns out I can't use Phantom in my attempts to control two usb towers
as it only supports one. I've just been reading some Ghost documentation and it
seems to work in a completely different way to Spirit.ocx. It doesn't even
support the functions I need, namely Poll() and Setvar(). It doesn't even seem
to have equivalents and seems ridiculously complicated.

I've noticed Spirit and Ghost are rarely mentioned here, let alone compared. I'm
beginning to see why, but I like Spirit because of it's simplicity (although I
did have a few problems early on).

If I can't replicate Spirit's functionality with Ghost than I'll have to revert
to the rechargeable solution, which I'm very close to deciding to do at this
point. If the solution exceeds a certain level of difficulty to solve then it
won't be worth it compared with just changing batteries and I'll take that
course instead.

Steve



Message has 1 Reply:
  Re: Two Usb towers
 
Just as a point of reference -- My latest creation has 7 motors, requiring 3 RCX's. All the high-level logic is written in Python and runs on my laptop. I communicate with the bricks through a single usb tower, using simple file I/O. The open call (...) (19 years ago, 17-Aug-05, to lugnet.robotics)

Message is in Reply To:
  Re: Two Usb towers
 
(...) When you use VB, I assume you have a function something like this to find & open the port: -- Public Function FindTower() On Error GoTo FindError Dim strPort As String Set Me.LEGOcom = New LEGOVPBrickLib.VPBrick Me.LEGOcom.FindPort strPort (...) (19 years ago, 2-Aug-05, to lugnet.robotics)

10 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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