|
In lugnet.general, Bob Kojima wrote:
|
Now you can use your RCX to control LEGO Power Functions.
Thats right the RCX can act as a PF remote control but it
can do something that the PF remote cant do yet. The RCX
can do PWM with your PF reciever moduals.
You do not need to install BrickOS to get this to work. The
executable that you need and the BrickOS firmware are included
in this packet.
Get it here: http://www.fial.com/bob/lego/PowerFunctions.zip
The zip file includes a sample program that uses 2 rotation sensors
to control the PWM on the red and blue ports it can also send controls
to all 4 PF chanels. Also included is a .h file that impliments the
complete Power functions protocol for BrickOS.
Please let me know of any changes or bugs that need to be addressed.
Bob
|
I dont have BrickOS, but I have been playing with the protocols in NBC. I got
the twin-motor PWM mode to work in tests, and the original Combo direct. But
I cant get Single output or either of the Single pin modes to work. Have
you had any more luck?
Jason R
|
|
|
|
direct. But I cant get Single output or either of the Single pin modes
to work. Have you had any more luck?
|
The toggle bit is checked in Single output mode (the documentation is not quite
right for this mode) and in both single pin modes. each message is sent 5 times
you need to toggle the toggle bit in every message sent. 0 1 0 1 0 1 0 1 etc.
bob
|
|
|
In lugnet.general, Bob Kojima wrote:
|
|
direct. But I cant get Single output or either of the Single pin
modes to work. Have you had any more luck?
|
The toggle bit is checked in Single output mode (the documentation is not
quite right for this mode) and in both single pin modes. each message is
sent 5 times you need to toggle the toggle bit in every message sent. 0 1 0 1
0 1 0 1 etc.
bob
|
Okay, thanks. I can get Single output Mode to work now. Single pin Mode
may be working too, but Im not sure what to expect from it.
I would expect setting either C1 or C2 would set them to 9V and run a motor
forwards or backwards. Setting them both would stop it.
But it seems if I set them, they do nothing. Unless the motor is already
running. If its running forwards at slow speed, then I set C1, it jumps up to
full speed. But then if I set C2 it keeps running, and if I clear C1 it keeps
running, and in the same direction.
Can you get a motor to run just be setting C1?
Jason R
|
|
|
|
Okay, thanks. I can get Single output Mode to work now. Single pin Mode
may be working too, but Im not sure what to expect from it.
I would expect setting either C1 or C2 would set them to 9V and run a motor
forwards or backwards. Setting them both would stop it.
But it seems if I set them, they do nothing. Unless the motor is already
running. If its running forwards at slow speed, then I set C1, it jumps up
to full speed. But then if I set C2 it keeps running, and if I clear C1 it
keeps running, and in the same direction.
Can you get a motor to run just be setting C1?
Jason R
|
i have not really spent a lot of time trying to figure these modes out. i was
more concerned with getting the PWM to work correctly. im going to spend more
time testing this and will let you know.
bob
|
|
|