Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Recommended Posts

Posted

Wow wow wow!!! That is very cool and definitely keep us posted as you progress. Are you simply emulating the "step up/down one speed" of the train controller, or does your controller actually say, "go to speed N"? The latter would be much more helpful. Oh, and the virtual lego controllers on the smart phone are cool too.

Posted

Very very nice! Do I see OSHpark ?! ;)

Thank you! Yes, you do. :wink:

Wow wow wow!!! That is very cool and definitely keep us posted as you progress. Are you simply emulating the "step up/down one speed" of the train controller, or does your controller actually say, "go to speed N"? The latter would be much more helpful. Oh, and the virtual lego controllers on the smart phone are cool too.

It's currently emulating "step up/down one speed." However, when a command is sent to the device, it reports back the current speed of each channel after making any requested changes. Sending an unrecognized command is, in effect, polling for the current speeds. You could use this to implement "go to speed N" externally without any changes to the firmware, but going directly to a particular speed (other than max) is something I have considered adding to the command set.

I also had the thought after filming the video that an NXT motor could be used as a joystick, but the restriction to only 7 PF speeds made it seem not so worthwhile. If I add "go to speed N," I will most likely add "go to duty cycle X" as well, in order to achieve "continuously variable" speeds.

Posted

It's currently emulating "step up/down one speed." However, when a command is sent to the device, it reports back the current speed of each channel after making any requested changes. Sending an unrecognized command is, in effect, polling for the current speeds. You could use this to implement "go to speed N" externally without any changes to the firmware, but going directly to a particular speed (other than max) is something I have considered adding to the command set.

I was thinking IR receiver here for a second and was baffled by, "it sends back current speed" (it's late). I know the IR supports "go speed X" and I have fiddled with the Hi-Technic IR sensor for NXT for that reason, but in order to be within spec for the NXT, the power is too low to the NXT sensor to be useful to me (even though it is actually a broadcaster, they call it a sensor because it plugs into a sensor port).

At any rate, to me the attractiveness of "go speed X" is so that you could run multiple units on a train and have their speeds synchronized with a single controller. Something it is tricky to do with they IR system. Using your approach it would likely be a simple extension in code, "make units A B and C go speed X." Then when A reports back it has it X but B is still changing, the software can send separate commands to each of the units until all of them have reached X. Yeah I know, it is hard enough to get one moving, worry about multiples later.

This is neat stuff, keep it up!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...