Posted November 7, 201410 yr 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 November 7, 201410 yr by NXT45
November 7, 201410 yr 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 November 7, 201410 yr by Lipko
November 7, 201410 yr 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.
November 7, 201410 yr Do you take into consideration using leJOS? There is a driver for IRLink around, and the code would be quite straightforward.
November 7, 201410 yr 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!
November 7, 201410 yr 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.
November 7, 201410 yr 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.
November 7, 201410 yr 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.