Hi, I'm trying to create a program for a robot that never falls down of a table.
I have done it but I have a problem. I want the robot to move with a random movement, by logic in the direction.
So, the problem is that I want the robot to one time turn left and maybe the other turn right, or not. Make it by chance.
I don't know how to do it, could you help me, please?
thankyou and sorry for my bad english! TT
can you help me?
Re: can you help me?
hello dear aarnau
We need more informations in order to help you.
First of all, give your code, well documented if possible, in order for us to understand where you want to introduce some random, AND say what programming env. you're using!
Second of all, give us some photos of your project, to bring us more informations with your difficulties. (Not to mention that we need more pictures here, to make this forum more attractive and inspiring )
Looking for your answer, best regards
Ben
We need more informations in order to help you.
First of all, give your code, well documented if possible, in order for us to understand where you want to introduce some random, AND say what programming env. you're using!
Second of all, give us some photos of your project, to bring us more informations with your difficulties. (Not to mention that we need more pictures here, to make this forum more attractive and inspiring )
Looking for your answer, best regards
Ben
pbenco.wordpress.com/
Re: can you help me?
Hi I am new in this web and I don't understand what code mean here. What do you want me to do?
I am using NXT 2.0 when I am programming and my robot is a simple building robot, like a explorer more or less.
I also don't know how to attach a photo here, how can I do it?
My question is not to solve my program, I only want to explain me if I can make the robot turn left or right by chance, in a forever loop. So, some times it will turn left and the others it will turn right.
Thankyou.
I am using NXT 2.0 when I am programming and my robot is a simple building robot, like a explorer more or less.
I also don't know how to attach a photo here, how can I do it?
My question is not to solve my program, I only want to explain me if I can make the robot turn left or right by chance, in a forever loop. So, some times it will turn left and the others it will turn right.
Thankyou.
Re: can you help me?
OK aarnau
I understand you are programming the NXT kit with the graphical programming environment provided by LEGO, NXT-G.
You have in NXT-G A random generator, the block with a dice on it, http://www.legoengineering.com/knowledg ... ock+for%3F
You can configure it easily:
Range: is for setting min and max values desired, min and max included.
Drag the Value # to connect everywhere you want... it delivers a numerical value, so you can use math to scramble your direction choice... Or use a switch block to bring some unpredictable behaviour.
please refer to the help of random and switch blocks...
Hope this help
Ben
I understand you are programming the NXT kit with the graphical programming environment provided by LEGO, NXT-G.
You have in NXT-G A random generator, the block with a dice on it, http://www.legoengineering.com/knowledg ... ock+for%3F
You can configure it easily:
Range: is for setting min and max values desired, min and max included.
Drag the Value # to connect everywhere you want... it delivers a numerical value, so you can use math to scramble your direction choice... Or use a switch block to bring some unpredictable behaviour.
please refer to the help of random and switch blocks...
Hope this help
Ben
pbenco.wordpress.com/
Re: can you help me?
ok thankyou I have program it a little bit different but It works. I only have to try it in the whole program, and I'll say if it works or not.
thankyou for the help
thankyou for the help
Who is online
Users browsing this forum: No registered users and 0 guests