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

Featured Replies

Posted

Hi I just bought a lego IR link sensor and am in the proccess of making a program for it. I will be using 1 nxt in my technic creation. I want to use 2 touch sensors to move one PF motor forwards or backwards on a channel selected by the left/right nxt buttons.

The problem is that I wanted to use the left/right buttons on the brick to change the PF channels but limit it so that it can only change to 3 channels. (I hope that makes sense.) I am using the NXT software to program these robots.

Here are the programs. http://www.brickshel...ry.cgi?f=549419 (Folder is not yet public so when it is click on the folder problems.)

Edited by NXT45

You need something like this?

if(right_button_pressed AND channel_index < 3) then

channel_index = channel_index +1

end if

?

anyhoo, deeplink the programs please.

Edited by Lipko

  • Author

You need something like this?

if(right_button_pressed AND channel_index < 3) then

channel_index = channel_index +1

end if

?

anyhoo, deeplink the programs please.

I want to use the nxt software to prgram this robot.

Thanks anyways. :wink:

Do you take into consideration using leJOS? There is a driver for IRLink around, and the code would be quite straightforward.

  • Author

Do you take into consideration using leJOS? There is a driver for IRLink around, and the code would be quite straightforward.

I know a lot about programming in the nxt software so I think I'll stick with that. Thanks anyways!

It's not clear for me what you are asking. Do you ask about the API, about sematics of Mindstorm programming, about the algorithm to use to limit the channel id, or about using the hardware, or how the implement the whole feature from zero.

  • Author

It's not clear for me what you are asking. Do you ask about the API, about sematics of Mindstorm programming, about the algorithm to use to limit the channel id, or about using the hardware, or how the implement the whole feature from zero.

What I want is a limit to how many times the variable is changed when you press the left/right NXT buttons.

What I want is a limit to how many times the variable is changed when you press the left/right NXT buttons.

Oh I see now, some dataflow like language. I'm pretty sure there's a conditional block or something, google for "conditional" + the programming tool/language's name

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...

Recently Browsing 0

  • No registered users viewing this page.
Sponsored Links