Please help...
Please help...
Hello friends, somebody can help my with LEGO mindstorms nxt 2.0? i have a color sorter and programm in LEGO MINDSTORM soft... but i need make this program in brix... i dont know how i can save starting motor angle and then tur it in position, what i need... i can sand to e-mail program .rbt file, sombody can help make it in BRICX?
Re: Please help...
You want to convert this NXT-G "code" to NXC?
[NXC is a programming language, and BricxCC is an IDE.]
A few things:
*Hmmm... Maybe Visual NXC is a good idea.
[NXC is a programming language, and BricxCC is an IDE.]
A few things:
- Why do you want to do this?
- There's no "easy way" to do it; you'd have to learn* NXC. (Which isn't that hard.)
- Please make the title more descriptive.
Code: Select all
// Declare motor position variable and set it to 0
long motorPos = 0;
// Get the current motor position in degrees, and store it in motorPos
// OUT_A means Motor A
motorPos = MotorRotationCount(OUT_A);
// Move Motor A forward by 360 degrees, and with 75% power
RotateMotor(OUT_A, 75, 360);
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Re: Please help...
yes, i want convert this project to BricxCC (.nxc) code
Re: Please help...
As I asked earlier, "why?" Just on whim (hooray! ), or because you were required to? Or do you want to learn NXC? If so, there are far better ways to do that than try to translate programs from one language to another. If you translate, you won't be using any of the so-called good practices that come with a programming language.
Also, do you have any prior experience with NXC, or other programming languages?
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Re: Please help...
i need this programm in BRICX, because i write work about two robots, one robot is programmed in bricxx but othet in LEGO software... i want other robot programm get in BRICX code... i need it very much...
Re: Please help...
It doesn't matter which language each robot is in*; they're all compiled into the same bytecode** ".rxe" files, although the compiled NXC code ones tend to be much smaller and faster.zykro wrote:i need this programm in BRICX, because i write work about two robots, one robot is programmed in bricxx but othet in LEGO software... i want other robot programm get in BRICX code... i need it very much...
If you post the other NXC code, and explain your objectives (what the robot should do), we might be able to help you better. Be sure to post the NXC code in
Code: Select all
...[/code ] tags (without the extra space before the "]", or attach it in a .zip file.
*Unless, of course, you're using special NBC/NXC EF only features, which I doubt you are in NXT-G.
**They run on a VM, so it should be "bytecode", not "machine code", right?
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Who is online
Users browsing this forum: Semrush [Bot] and 0 guests