Page 2 of 2

Re: Problem making NXT-g wall follower program

Posted: 11 Apr 2012, 09:20
by jonnxt
I´m sorry, but in the program where it says "The loop ends if the loop count
equals the Stop Value" it should say "The loop ends if the touch sensor has bumped in to a wall a many times as the stop value the Stop Value"

I got an idea some days ago, and i thought it would do almost what i wanted it to do, but when I ran the program it stopped before the second loop. What i tried, was to count how many times the touch sensor has been pressed and released in an other task.

Here is the updated program
Wall Follower.rbt
(1.64 MiB) Downloaded 359 times

Re: Problem making NXT-g wall follower program

Posted: 12 Apr 2012, 13:30
by jojoguy14
Well, here are a couple of tips:
1. Are you using TWO touch sensors? Because, the switch is on Touch Sensor (TS) port 2, but all of the other Wait block TS's are on port 1.
2. You are having the motors for "Unlimited". So, even if the Stop Value is met, the motors are still going to run.
3. Along the lines of #2, I would put a stop block after the loop so that the motors stop :-).

I work with elementary school kids on this kind of stuff (yes, NXT stuff), so I know where you're coming from. Same with my elementary school kids, I don't want to do the program FOR you. I'll give you tips, but I won't give you an edited program :-).

I hope these tips help and, hopefully, accomplish your mission! Please reply if you need more help or just to say "It works!" :-)

Joey "jojoguy10"

Re: Problem making NXT-g wall follower program

Posted: 16 Apr 2012, 15:06
by jonnxt
Hello

I´m sorry again, but this time forgot to delete some of the program.
I down´t have a robot built op right now, but i´ll build it soon.
Wall Follower.rbt
Here is the program again
(1.35 MiB) Downloaded 547 times
Jon

Re: Problem making NXT-g wall follower program

Posted: 17 Apr 2012, 00:49
by jojoguy14
jonnxt wrote:Hello

(1)I´m sorry again, but this time forgot to delete some of the program.
(2)I down´t have a robot built op right now, but i´ll build it soon.
Wall Follower.rbt
Jon
(1)OK, I see what you did. But, you still have different touch sensors and the motors are set for unlimited.
(2)Well.....how do you test your program if you don't have a robot to test it on? :)

Joey "jojoguy10"

Re: Problem making NXT-g wall follower program

Posted: 20 Apr 2012, 10:56
by jonnxt
I have built the spike. It is made to be like a scorpion. It has a touch senor on its tail and it is with two motor drive. I can simply press the touch sensor with my finger.

Does this look any better?
Wall Follower.rbt
Here is the program
(1.44 MiB) Downloaded 344 times
When i tried it some days ago, it would not start the second loop!
I had the same problem today too.

Jon

Re: Problem making NXT-g wall follower program

Posted: 20 Apr 2012, 13:27
by jojoguy14
jonnxt wrote: When i tried it some days ago, it would not start the second loop!
I had the same problem today too.
Well....here's the first problem I see:
You say in the comment (in the program) that you have to press the "Enter Button". By that, I assume you mean the orange button on the NXT screen, correct? Well, the loop is set to exit when the LEFT NXT Button is pressed.

Also, since you're using Spike, do you, in fact, have 2 touch sensors? Because, the last two loops have conflicting touch sensor ports. One of them is Port 1 and the other is Port 2.

Joey "jojoguy10"

Re: Problem making NXT-g wall follower program

Posted: 25 Apr 2012, 14:43
by jonnxt
It is a long time ago I destoryed spike. Now i have built Multi Bot from Nxtprograms (Here is the link to Multi Bot "http://www.nxtprograms.com/NXT2/multi-bot/index.html"). I have got help frome someone out ov the forum and we found some of the problem.
Wall Follower.rbt
Here is the updated program
(1.74 MiB) Downloaded 314 times
The extra variables are the problem solvers. (The problem was that all the data wires are confusing the robot or the software).
Now my program does not count, so the program does not stop!
(the souns blocks and the part of the program that converts a variables number to text is used for troubleshooting).

Re: Problem making NXT-g wall follower program

Posted: 25 Apr 2012, 17:24
by hassenplug
jonnxt wrote:I have got help frome someone out ov the forum and we found some of the problem.

(The problem was that all the data wires are confusing the robot or the software).
I believe all the data wires were confusing the programmer. The robot was doing exactly as it was told. (they normally do that)
jonnxt wrote: Now my program does not count, so the program does not stop!
Wish I would have suggested that 23 days ago.

Glad to hear that you found someone who could figure it out.
Steve