|
If you have 2 NXTs lying around and you are moderately interested in testing
some potentially interesting new NBC and NXC API macros then I would definitely
be interested in hearing from you via email. I have written a few additions to
the NXTDefs.h and NXCDefs.h header files for NBC and NXC and I plan on testing
all these new functions myself but if I could get a little help from other
people I would be very grateful.
To wet your appetite:
result = ReceiveRemoteBool(queue, clear, bval);
result = ReceiveRemoteNumber(queue, clear, val);
result = ReceiveRemoteString(queue, clear, str);
result = ReceiveRemoteMessageEx(queue, clear, str, val, bval);
result = SendRemoteBool(conn, queue, bval);
result = SendRemoteNumber(conn, queue, val);
result = SendRemoteString(conn, queue, str);
result = RemoteMessageRead(conn, queue);
result = RemoteMessageWrite(conn, queue, msg);
result = RemoteStartProgram(conn, filename);
result = RemoteStopProgram(conn);
result = RemotePlaySoundFile(conn, filename, bloop);
result = RemotePlayTone(conn, frequency, duration);
result = RemoteStopSound(conn);
result = RemoteKeepAlive(conn);
result = RemoteResetScaledValue(conn, port);
result = RemoteResetMotorPosition(conn, port, brelative);
result = RemoteSetInputMode(conn, port, type, mode);
result = RemoteSetOutputState(conn, port, speed, mode, regmode, turnpct,
runstate, tacholimit);
The NBC versions are identical except that instead of returning a result you
pass a result variable as the last parameter (i.e., RemoteKeepAlive(conn,
result)).
I have tested many of these myself with good success. My testing, however, has
definitely not been exhaustive.
All of them (except the first four) use the BluetoothWrite system call under the
hood so they will probably need to be used in conjunction with the
BluetoothStatus function so that you do not stomp on previous write attempts.
If you want to try them out yourself and report your findings (successes or
failures) to me then send me an email and I'll send you the modified header
files.
John Hansen
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in...
Robotics
NXT programmable brick
|
|
|
|