|
Ben Fleskes wrote:
> When I first bought my RCX some time ago, I dreamed of using the remote control
> to drive the train. Well I think I finally have it working. The following
> code works but has a problem which perhaps somebody can help me with.
>
> The program looks for input from the message buttons on the infrared remote.
> Message 1 decreases speed, Message 2 sets the speed to 0, and Message 3
> increases the speeed. On problem I have is that when I give it message 2, the
> variable 'speed' goes to zero but the motor doesn't stop. Anyone know what I'm
> doing wrong? Anyone have suggestions for refining the code. Perhaps a better
> speed control algorithem. Thanks to Dave B(for NCQ) and Mark Overmars (for the
> tutorial)
>
> Thanks for any advice, hints, feedback or suggestions
>
> Here is the code: (please excuse me if it is not appropriate to post it here)
<...SNIP...>
I won't go into the code detail as other members have already corrected it.
I just wanted to say that if your interested in my RCX Train code, it's almost
ready. (Phase 1 anyway)
It has a few modes of use. MS Remote control. (Forward, stop, reverse) IT is field
programmed at startup for the mode. It has a track reader that reads the location
of the track (For the computer controlled mode) and it allows the user to change
the power levels (For load dependence). It also has a horn. GRIN
It has a special modified motor that picks up track power to the RCX and allows for
direct RCX control without sending the power out to the track.
It will have in future:
Auto train decoupler
Track speed reader (To automatically adjust power levels depending on load and
incline)
Automatic point switching from onboard the train.
Any anything else I think up. heh.
http://www.akasa.bc.ca/tfm/lego_rcxtrain.html for outdated pics of the train and
it's special motor.
http://www.akasa.bc.ca/vlc/vlc000304/00030415.jpg.html New pic of the train in
Field testing
Dean
--
TFM's Home Page: http://www.akasa.bc.ca/tfm
Vancouver Lego Club: http://www.akasa.bc.ca/vlc
|
|
Message is in Reply To:
84 Messages in This Thread: ![infrared remote control of LEGO trains using NCQ and RCX -Ben Fleskes (22-Mar-00 to lugnet.robotics.rcx.nqc, lugnet.trains)](/news/x.gif) ![](/news/246.gif) ![Re: infrared remote control of LEGO trains using NCQ and RCX -Dan Boger (22-Mar-00 to lugnet.robotics.rcx.nqc, lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NCQ and RCX -Ben Fleskes (22-Mar-00 to lugnet.robotics.rcx.nqc, lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/268.gif) ![Re: infrared remote control of LEGO trains using NCQ and RCX -Reinhard "Ben" Beneke (22-Mar-00 to lugnet.robotics.rcx.nqc, lugnet.trains)](/news/x.gif) ![](/news/246.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Ben Fleskes (22-Mar-00 to lugnet.robotics.rcx.nqc, lugnet.trains)](/news/x.gif) ![](/news/246.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Ludo Soete (22-Mar-00 to lugnet.robotics.rcx.nqc, lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Reinhard "Ben" Beneke (22-Mar-00 to lugnet.robotics.rcx.nqc, lugnet.trains)](/news/x.gif) ![](/news/246.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Larry Pieniazek (22-Mar-00 to lugnet.robotics.rcx.nqc, lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -John Neal (23-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/246.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -James Powell (23-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/246.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Frank Filz (23-Mar-00 to lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Larry Pieniazek (23-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/246.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -John Neal (23-Mar-00 to lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -James Powell (23-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Larry Pieniazek (23-Mar-00 to lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Stacy J. Bledsoe (23-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Larry Pieniazek (23-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Stacy J. Bledsoe (23-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Stacy J. Bledsoe (23-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Larry Pieniazek (24-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Michel Magnan (24-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Stacy J. Bledsoe (26-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Jawn Henry construction notes (was Re: infrared remote control of LEGO trains using NQC and RCX -Larry Pieniazek (27-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: Jawn Henry construction notes (was Re: infrared remote control of LEGO trains using NQC and RCX -Christopher Masi (27-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: Jawn Henry construction notes (was Re: infrared remote control of LEGO trains using NQC and RCX -Stacy J. Bledsoe (27-Mar-00 to lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -John Neal (23-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Larry Pieniazek (24-Mar-00 to lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: infrared remote control of LEGO trains using NQC and RCX -Frank Filz (23-Mar-00 to lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![More Train Thoughts - was remote control -Ralph Hempel (22-Mar-00 to lugnet.trains)](/news/x.gif) ![](/news/46.gif) ![Re: More Train Thoughts - was remote control -Frank Filz (22-Mar-00 to lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![roundhouse discussion: was: Re: infrared remote control of LEGO trains using NQC and RCX -Ben Fleskes (22-Mar-00 to lugnet.trains)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![New LEGO train realism? (was:Re:infrared remote control of LEGO trains using NCQ and RCX) -John Neal (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism -John Gerlach (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? (was:Re:infrared remote control of LEGO trains using NCQ and RCX) -Reinhard "Ben" Beneke (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? (was:Re:infrared remote control of LEGO trains using NCQ and RCX) -Larry Pieniazek (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -Reinhard "Ben" Beneke (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -Ben Fleskes (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![module standards -Christopher Tracey (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Larry Pieniazek (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -James J. Trobaugh (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -John Gerlach (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -James J. Trobaugh (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Christopher Masi (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Ben Fleskes (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -Dean Husby (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -Larry Pieniazek (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: New LEGO train realism? -Ben Fleskes (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Mike Walsh (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![Club Table Standards was Re: New LEGO train realism? -James J. Trobaugh (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: Club Table Standards was Re: New LEGO train realism? -Christopher Tracey (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: Club Table Standards was Re: New LEGO train realism? -James J. Trobaugh (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: Club Table Standards was Re: New LEGO train realism? -James J. Trobaugh (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Kevin Wilson (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -John Gerlach (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -Reinhard "Ben" Beneke (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -Daniel Siskind (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![GMLTC Storm Watch 2000 -John Kelly (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: New LEGO train realism? -John Matthews (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -John Gerlach (22-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -Mike Poindexter (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -John Gerlach (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -Charles Eric McCarthy (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Larry Pieniazek (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -Daniel Siskind (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -Larry Pieniazek (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -John Matthews (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Tom Stangl (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -John Gerlach (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -Larry Pieniazek (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Mike Poindexter (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -Larry Pieniazek (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -John Kelly (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -Mike Poindexter (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -John Gerlach (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Legomodular standards -Larry Pieniazek (23-Mar-00 to lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Mike Poindexter (23-Mar-00 to lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Larry Pieniazek (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/246.gif) ![Re: New LEGO train realism? -John Gerlach (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -John Kelly (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif) ![](/news/46.gif) ![Re: New LEGO train realism? -Mike Poindexter (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: New LEGO train realism? -Brian Williams (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Reinhard "Ben" Beneke (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New LEGO train realism? -Larry Pieniazek (23-Mar-00 to lugnet.trains, lugnet.trains.org)](/news/x.gif)
![](/news/x.gif) ![](/news/68.gif) ![You are here](/news/here.gif)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|