To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.generalOpen lugnet.general in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 General / 54445
Subject: 
Re: Power Function control with RCX and BrickOS
Newsgroups: 
lugnet.general, lugnet.technic, lugnet.trains, lugnet.robotics
Date: 
Fri, 25 Jan 2008 22:23:57 GMT
Viewed: 
18203 times
  
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

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 don’t 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 can’t get ‘Single output’ or either of the ‘Single pin’ modes to work. Have you had any more luck?

Jason R


Subject: 
Re: Power Function control with RCX and BrickOS
Newsgroups: 
lugnet.general, lugnet.technic, lugnet.trains, lugnet.robotics
Date: 
Fri, 25 Jan 2008 23:41:58 GMT
Viewed: 
18374 times
  
   direct’. But I can’t 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


Subject: 
Re: Power Function control with RCX and BrickOS
Newsgroups: 
lugnet.general, lugnet.technic, lugnet.trains, lugnet.robotics
Date: 
Sat, 26 Jan 2008 16:12:00 GMT
Viewed: 
18578 times
  
In lugnet.general, Bob Kojima wrote:
  
   direct’. But I can’t 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 I’m 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 it’s 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


Subject: 
Re: Power Function control with RCX and BrickOS
Newsgroups: 
lugnet.general, lugnet.technic, lugnet.trains, lugnet.robotics
Date: 
Sat, 26 Jan 2008 21:45:50 GMT
Viewed: 
18414 times
  
  
Okay, thanks. I can get ‘Single output Mode’ to work now. ‘Single pin Mode’ may be working too, but I’m 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 it’s 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. i’m going to spend more time testing this and will let you know.

bob


©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR