|
Hi,
yeah... me I just went through such trouble using Java. The RTS should
be 'false'. Then by experimenting I found switching the DTR before and after
sending to have some positive effect.
I trust you adhere to
+ starting a session with 'Alive' followed by 'Unlock Firmware'
+ the packaging of the byte codes with the
[header bytes] [byte] [~byte] ... [sum of byte] [~sum of byte]
+ the different header bytes (and reply header bytes) for rcx and cm
CM header to robot 0xfe 0x00 0x00 0xff
from robot 0xff
RCX to robot 0x55 0xff 0x00
from robot 0x55 0xff 0x00
the difficult part is the reading. I had lost of troubles figuring out
if there was something -real/meaningfull- to READ on the port.
A couple of evenings of experimenting, and improving the reading logic
were necessary.
Cheers,
Theo.
In lugnet.robotics, Oliver Kutsche writes:
> Hi,
>
> I've written a small Visual Basic program so I can use Cybermaster under
> Windows 3.1x. (So I cannot use spirit.ocx.)
>
> Sending commands works (motor on/off, sound, etc.). But I don't get any
> echo. I cannot get any sensor data, and I can't see if my commands are
> correctly received by the Spirit unit.
>
>
> I use mscomm.vbx for communicating with the RC tower:
>
> ' 2400 baud, odd parity, 8 data bits, 1 stop bit:
> Comm1.Settings = "2400,o,8,1"
>
> ' setting InputLen to 1 or 15 doesn't seem to change anything:
> Comm1.InputLen = 0
>
> ' opening port:
> Comm1.PortOpen = True
>
> ' setting flags:
> Comm1.DTREnable = True ' set dtr
> Comm1.RTSEnable = True ' set rts
> Comm1.CDHolding = False ' set cd
> Comm1.CTSHolding = False ' set cts
> Comm1.DSRHolding = False ' set dsr
>
> The Spirit unit seems to send something (LED flashes) but the RC tower
> doesn't receive anything (no LED activity unless it's sending).
>
> When I connect to a modem, receiving data works (e.g. 'OK.' after 'AT').
> BTW, of course the Cybermaster CD works, too (e.g. Arena reacts to punches
> on sensors and Garage can read battery power)
>
>
> BTW, another problem: When I send to commands in a row the second is not
> understood by the Spirit unit until I have a pause of about 100 ms between
> two commands.
>
> Does anybody have a suggestion?
>
> TIA,
> Oliver
|
|
Message has 1 Reply:
Message is in Reply To:
6 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
|
|
|
|