|
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
|
|
|
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
|
|
|
Bob Kojima wrote:
> Now you can use your RCX to control LEGO Power Functions.
> That's right the RCX can act as a PF remote control but it
> can do something that the PF remote can't 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
Bob,
I could not wait to get home from work to try this. I want to say thank
you; your effort has saved me many countless hours.
I loaded the Firmware, and the Program into a 1.0 RCX, and the brick
worked flawlessly! On my 1.0 brick, I was able to have that yellow
bulldozer race around my floor all via the glory of RCX control; AND
under PWM.
This was a lot of fun, and I cant wait to build it into a robot for one
of rtl's next games.
Just cause I can, I then downloaded the BrickOS firmware, and the
program, into a 2.0 RCX. I am sad to say I could not get the RCX to
control the Bulldozer reliably. The firmware, and program loaded with
out a hitch. But as Philo, and Mark discussed here:
http://news.lugnet.com/robotics/rcx/?n=2228
The 1.0 and the 2.0 RCX use 2 different IR frequencies. I had to hold
the RCX within inch's of the PF recievers to get it to accept any
signal, and then, the funny part was that even with the 2.0 RCX off, the
PF still kept driving the left track FWD.
:)
Just wanted to let you know. Again, Thank you.
Chris
|
|
|
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
|
|
|
Thank you very much for that fine piece of software Bob!
After reading your post I immediately run in my LEGO room to grab an RCX and the
IR tower to test your software. Well, I had to find out that I had not enough
batteries at home and thus had to get some overpriced ones at the next gas
station :-)
Download of the firmware as well as the program worked fine. The program runs
without problems and the Bulldozer reacts immediately. Great!
I have a few issues though where Id like to ask you for some hints:
- The rotation sensor sets zero at the position it was during start of the program. By stepwise moving the axle in one direction, the PF motor runs first at max. speed and then gets slower and slower. So PWM works fine. But how can I change the program in a way that from zero position the speed increases when turning the axle of the rotation sensor? Currently it decreases stepwise from max. speed which makes it somewhat difficult to control the Bulldozer (or whatever model using the PF motors).
- Furthermore I found out that turning the rotation sensor in one direction, the motor runs in for example forward direction. I thought by turning the connector plate on the sensor interface of the RCX would change direction of revolution of the motor when the sensor is turned in the same direction as before. Of course, I tried all four possible orientations of the connector, but the motor still turns always in the same direction when turning the axle of the rotation sensor forward? Is this the correct behaviour?
- Finally, does it happen to you too, that the rotation sensors loose calibration very fast? Just after playing around for a few cycles (forward, backwards, forward...) The zero position is not at the same place any more.
If you could give me some hints on how to overcome these issues, this would be
much appreciated. You will have to know that I am everything else than a
Mindstorms professional :-)
Thanks again for your work
Beat
PS. My intention is to build a proper remote control with two mechanical
joysticks, each coupled to two rotation sensors to be able to control all four
functions of the Bulldozer at the same time.
|
|
|
> I could not wait to get home from work to try this. I want to say thank
> you; your effort has saved me many countless hours.
>
> I loaded the Firmware, and the Program into a 1.0 RCX, and the brick
> worked flawlessly! On my 1.0 brick, I was able to have that yellow
> bulldozer race around my floor all via the glory of RCX control; AND
> under PWM.
>
> This was a lot of fun, and I cant wait to build it into a robot for one
> of rtl's next games.
>
> Just cause I can, I then downloaded the BrickOS firmware, and the
> program, into a 2.0 RCX. I am sad to say I could not get the RCX to
> control the Bulldozer reliably. The firmware, and program loaded with
> out a hitch. But as Philo, and Mark discussed here:
>
> http://news.lugnet.com/robotics/rcx/?n=2228
>
> The 1.0 and the 2.0 RCX use 2 different IR frequencies. I had to hold
> the RCX within inch's of the PF recievers to get it to accept any
> signal, and then, the funny part was that even with the 2.0 RCX off, the
> PF still kept driving the left track FWD.
>
> :)
>
> Just wanted to let you know. Again, Thank you.
Glad it worked for you and thanks for the heads up on the RCX 2.0 problems. i
don't have a 2.0 RCX to play with so i'm not sure if it is a timing issue that
can be resolved or what.
i was very excited the first time i got my RCX to talk to the PF reciever. i
pushed the run button expecting nothing to happen just like nothing had happend
the other 800 times i had hit the run button. then something moved! i screamed
so loud my wife though i had hurt myself.
bob
|
|
|
In lugnet.general, Beat Felber wrote:
|
Thank you very much for that fine piece of software Bob!
After reading your post I immediately run in my LEGO room to grab an RCX and
the IR tower to test your software. Well, I had to find out that I had not
enough batteries at home and thus had to get some overpriced ones at the next
gas station :-)
Download of the firmware as well as the program worked fine. The program runs
without problems and the Bulldozer reacts immediately. Great!
I have a few issues though where Id like to ask you for some hints:
- The rotation sensor sets zero at the position it was during start of the program. By stepwise moving the axle in one direction, the PF motor runs first at max. speed and then gets slower and slower. So PWM works fine. But how can I change the program in a way that from zero position the speed increases when turning the axle of the rotation sensor? Currently it decreases stepwise from max. speed which makes it somewhat difficult to control the Bulldozer (or whatever model using the PF motors).
- Furthermore I found out that turning the rotation sensor in one direction, the motor runs in for example forward direction. I thought by turning the connector plate on the sensor interface of the RCX would change direction of revolution of the motor when the sensor is turned in the same direction as before. Of course, I tried all four possible orientations of the connector, but the motor still turns always in the same direction when turning the axle of the rotation sensor forward? Is this the correct behaviour?
- Finally, does it happen to you too, that the rotation sensors loose calibration very fast? Just after playing around for a few cycles (forward, backwards, forward...) The zero position is not at the same place any more.
If you could give me some hints on how to overcome these issues, this would
be much appreciated. You will have to know that I am everything else than a
Mindstorms professional :-)
Thanks again for your work
Beat
PS. My intention is to build a proper remote control with two mechanical
joysticks, each coupled to two rotation sensors to be able to control all
four functions of the Bulldozer at the same time.
|
Well this was just a quickly hacked out example program to show how to use the
library function that i wrote. i realized at the time that the PWM started out
at fastest and went to slowest but i had run out of steam and never really got
back into it to fix it. ill probably spend some more time this week and make
the changes you suggested.
i will have to play around to see if i notice the calibration issues you
mentioned. one suggestion is to build a ratcheting mechanism like in the 8288
using the bionicle teeth and the rubber part that has 2 axle holes.
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
|
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
|
|
|
> Glad it worked for you and thanks for the heads up on the RCX 2.0 problems. i
> don't have a 2.0 RCX to play with so i'm not sure if it is a timing issue that
> can be resolved or what.
Could it be that the long range mode of IR is not set (I saw no reference to
range setting in your source, and I don't know the default state). Despite the
difference in carrier frequency, the RCX 1.0 and RCX2.0 are able to dialog
albeit with a seriously reduced range. Perhaps it is what we see here if we are
in short range mode? I have yet to test with a 2.0.
> i was very excited the first time i got my RCX to talk to the PF reciever. i
> pushed the run button expecting nothing to happen just like nothing had happend
> the other 800 times i had hit the run button. then something moved! i screamed
> so loud my wife though i had hurt myself.
;-D
Congratulation Bob! I'm impressed by your programming speed ;o)
Philo
|
|
|
A new version of my Power Functins library and PWM remote are now available at:
http://www.fial.com/bob/lego/PowerFunctions_101.zip
There was some code cleanup and fine tuning. The PWM remote program now goes
from slowest to fasted speed.
give it a try and thanks for all the feed back so far.
RCX 2.0 still probably does not work. I will try fixing it as soon as i get a
2.0 to test with.
In my testing of the Single Pin Clear Set Toggle commands, it seems like you
need to send a command out first that gets the motors running and then send a
Clear Set Toggle command before the time out is over.
Bob
|
|
|
Greetings-
What single book, if any, is considered the standard for LEGO NXT?
-David
|
|
|
David,
Zitat von David C Matthews <lego-robotics@crynwr.com>:
> What single book, if any, is considered the standard for LEGO NXT?
What does "standard for LEGO NXT" mean?
There are a lot of NXT-related books out there already, and they deal
with a variety of different topics (see for instance
http://thenxtstep.blogspot.com/search?q=books ).
I guess the answer to your question depends on what you want to know
about the NXT and the tasks you want to perform with it.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
|
|
|
In lugnet.general, Bob Kojima wrote:
|
A new version of my Power Functins library and PWM remote are now available
at:
http://www.fial.com/bob/lego/PowerFunctions_101.zip
There was some code cleanup and fine tuning. The PWM remote program now goes
from slowest to fasted speed.
give it a try and thanks for all the feed back so far.
RCX 2.0 still probably does not work. I will try fixing it as soon as i get
a 2.0 to test with.
In my testing of the Single Pin Clear Set Toggle commands, it seems like you
need to send a command out first that gets the motors running and then send a
Clear Set Toggle command before the time out is over.
Bob
|
Hey Bob
I have just tested your code, and it works good.But is it possible that you
could write some documentation to your code, it would be nice to fully
understand what your doing.
Best regards
Kim Andersen
|
|
|
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
|
Unfortunately the link no longer works and I cant find it anywhere on your new
website either. Is it still available anywhere?
Thanks in advance
Jetro
|
|
|
Hello Jetro,
check this URL:
http://www.fial.com/bob/lego/PowerFunctions_101.zip
I found it after some googling...
Greetings
Maico Arts
Jetro de Chateau schreef:
> In lugnet.general, Bob Kojima wrote:
> > Now you can use your RCX to control LEGO Power Functions.
> > That's right the RCX can act as a PF remote control but it
> > can do something that the PF remote can't 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>
>
> Unfortunately the link no longer works and I can't find it anywhere on your new
> website either. Is it still available anywhere?
>
> Thanks in advance
> Jetro
|
|
|
|
Unfortunately the link no longer works and I cant find it anywhere on your
new website either. Is it still available anywhere?
|
sorry, im in the middle of moving all my web sites and links to a new server.
you can now find the PF software and all the software that i have writen at this
link:
http://www.bong69.com
thanks,
bob
|
|
|