![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Not sure WE understand what you mean..
can you give an example of what you want to do and expect from it?
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD |
|
||||
|
Here are the details you ask :
I would like to use B4PPC to command a lego robotic brick, the "Mindstorms RCX 2.0". I've found on the web, a program called "nqc" that can send commands to the lego brick by typing dos commands. For exemple the command "c:\nqc.exe -Susb -raw 5103" makes the brick play the internal sound number 3. Another example, the command "c:\nqc.exe -Susb -raw 2181" makes the brick start the motor number 1. My problem is that other commands get the value of a sensor that is connected on the brick. For example, the command "c:\nqc.exe -Susb -raw 120901", when I type it in a dos window returns the value of sensor number 1. In B4PPC, I would like to put this return value in a variable. Thank you.
__________________
Pascal |
|
||||
|
The Process object in my Threading library Threading library for optimising compiler is an enhanced Shell facility and has a property "LastExitCode" that returns the exitcode of the last app that it has run.
|
|
||||
|
yes, but from what I could google about mindstorms, there are a few ocx, and .net based dll, so a wrapper should sufice, thus making the need of shell obsolete....
And far better performance I think... Here's one:
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD Last edited by Cableguy : 06-13-2008 at 06:18 PM. |
|
||||
|
The Mindstorms brick I have is the old one, the RIS 2.0, and not the new one (NXT).
The line between the brick and the PC is infrared : an infrared sender is connected to one usb port of the PC. I agree with Cableguy, concerning the low performance of the shell commands, but I personnaly don't know how to do a "wrapper", I only know B4PPC, So I'll try with shell commands. Thank you
__________________
Pascal |
|
||||
|
since you are using an IR tower, it must have a com port assigned to it, then the rest should be "normal" serial comunication...
I found alot of info about mindstorms and .net, also some sets of command and relations.... Nothing like an hands-on aproach to see if it works... use one of the serial IR examples to send a simple, ON/OFF command and see if it works... If so, build on it... PS.I wish I had one of those to play with.... perhaps if you decide to upgrade to the new version...argh just daydreamming
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD |
|
||||
|
I don't think it does. I believe that it requires its own USB driver to be installed and my guess would be that it is an HID (Human Interface Device) device (like a keyboard or mouse) as this is an easy way to interface a slow(ish) speed device to USB without writing a complicated driver as Windows already has a generic HID driver available. The interface is by File I/O calls and calls to a Windows dll - HID.DLL
|
|
||||
|
continuin googling I found that RIS2.0 should have come with, msot probably, a CD with some software, including .NET runtimes (DLL's)...
If this is to be true, then one of two things are true.. They(the dll's) run from B4PPc or need a wrapper... The IR tower, as far as I could figure, is standart issue in RIS2.0
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell command | J12345T | Questions & Help Needed | 2 | 06-08-2008 09:49 AM |
| Can a sub return more than 1 value ? | TWELVE | Questions & Help Needed | 13 | 05-28-2008 09:58 AM |
| Questions on shell command, and user event, and the 6.30 | dan kabestan | Questions & Help Needed | 2 | 05-15-2008 06:45 PM |
| How to find out that Shell command has finished | petrbury | Questions & Help Needed | 6 | 10-16-2007 07:20 PM |
| what are the codes for CR and LF? | Stellaferox | Questions & Help Needed | 7 | 06-02-2007 07:15 PM |