Robotics

I learned how to control the mind of a robot we used a nxt mindstroms and special codes which I typed on python to give it commands like forward reverse left and right and to move in squares and detect green tape.

Here's a copy of the code.


Before this code is used you had to click "run" on the top of python program it launch a new page it search for the code of the robot once found you'll type a command "bot.forward()" it will give the robot the command to go forward, you put bot.stop because that is what you named your robot. You can also name that you it different names like Juan1 or any that you want.


This code up here enables the robot to stay in an area that it is programmed to stay. The area of the selected color is green. The robot follows the length of the color green and is not supposed to go out of the area. Our groups robot failed I put the code "prog4line" and it just went straight forward the green line passing that and just went straight forward until it crashed into the wall The robot did not detect the green tape under it like it was suppose too. This command was more like for the robot to grow straight forward and only stop when the battery life died or crash.


This last code enables the robot to see moving objects walls and chairs stuff that it cannot get around. But the robot sometimes worked a few times. After it just started spinning in circles without stopping. I wasn't able to fix the codes for the problem because I put new codes and it made the robot movement looked like it was having a sezuire.


This code enables you connect wireless(bluetooth) to the robot so it picks up the single of when you give a command now that I notice this code I can see why it didn't want to work. If you notice port 1, I put the "#" sign in there when it wasn't necessary no wonder the number sign was all highlighted in red.


This is one of the sensors that checks the ground for colors that it is programmed. To know that it works it lights up when its on if it doesn't light up well you don't got a sensor that works. Just like my groups it just gonna walk right across the line that its suppose to detect even was on.

Home