(First, i'm very sorry for not being a native speaker. I hope you can understand me anyway).

Hello, do you know if there is any good NXT/RCX programs in which you can "program" your own robot inside the program using sensors?

I played around with the rotation sensor, and i quickly figured out that it could be used for quick input. I'm currently doing a program in which you can input commands to the robot using the rotation sensor and a touch sensor (or whatever sensors you'd like to use), the commands is then saved as an array which is then read, and the robot does the things you just ordered it to do. I suppose there's much to learn about this fun (but still simple) way of programming a robot in the robots own program

Currently, the inputs is really simple. When you start the program on the RCX/NXT, the value of the rotation sensor is displayed on the display. To program something, let's say "Set MotorC to 100 power", you turn the rotation sensor to the code for that, in this case 6, then you press the touch sensor. Then you continue until your code is finished, and when you're done, you select 0 as an input to stop inputing and to start the robot's program.
It's really simple, but you can still do some sweet stuff with it In the next version, i'm thinking of adding variables to it, where you first select your command, then you input a number.

I don't know if it's hard to understand, but basically, the robot starts moving at 100 speed forward, then it decreases it's speed to 0 over a 2 second period, then it repeats that until the battery is drained

I'd love to know how i can make a more fun way of programming the robot without a computer

That is a great idea, using the rotation sensor as a control and choosing what code you want it to run, I like it B-)

There is also another way to program your NXT without a computer. You can use the NXT Program feature that comes on the firmware. To get to this feature, turn Your NXT on, then scroll right once and select NXT Program. It then shows a screen and tells you witch ports to connect each sensor and motor to (you don't have to connect all of them if you don't want to). It has segments of code to choose from, and you can build a 4 step program. I think your program is allot nicer though, and it sounds like you can make programs longer than 4 steps

your idea looks like a language interpreter. In the past I worked with system expert and that was based on rules like : if x < c do y...

good idea.

jm

_________________SuntzuMaster- a French gentlemen in USA.

Thu Jun 07, 2007 9:18 am

Ran

Rookie

Joined: Sat Jun 02, 2007 11:09 amPosts: 3

starwarslegokid wrote:

That is a great idea, using the rotation sensor as a control and choosing what code you want it to run, I like it B-)

There is also another way to program your NXT without a computer. You can use the NXT Program feature that comes on the firmware. To get to this feature, turn Your NXT on, then scroll right once and select NXT Program. It then shows a screen and tells you witch ports to connect each sensor and motor to (you don't have to connect all of them if you don't want to). It has segments of code to choose from, and you can build a 4 step program. I think your program is allot nicer though, and it sounds like you can make programs longer than 4 steps

Scott B-)

Thank you!
Yeah, i suppose you could do several hundreds of program lines without any problems.
Hm, maybe i'll inplent multiple ways to program the unit, such as using two buttons to punch in 5-bit (31 alternatives and one to end input) code pieces and/or using a light sensor to scan bar codes (in the base of your choice between 2 to 5 or so ).

I've made a first edition now, on monday i'll bugtest it. The program is currently made for RCXs, but can easily be modified to work for NXTs.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum