Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: RoboMoon on August 12, 2010, 11:59:01 AM

Title: NXT
Post by: RoboMoon on August 12, 2010, 11:59:01 AM
I have a littele problem with my NXT 2.0 ...
Title: Re: NXT
Post by: blackbeard on August 12, 2010, 12:25:05 PM
on a first glance it doesn't look like you declared your variables right. for instance instead of writing this

total_time = 0;

wouldn't it be this

int total_time = 0;
Title: Re: NXT
Post by: Razor Concepts on August 12, 2010, 12:41:52 PM
No, he declared them right above the task_main() line.
Title: Re: NXT
Post by: blackbeard on August 12, 2010, 01:30:17 PM
Oh i see it. sorry about that.
Title: Re: NXT
Post by: voyager2 on August 13, 2010, 12:58:55 AM
Oh i see it. sorry about that.
Think before write!

RoboMoon, I suggest you stick with LEGOs GUI programing...
everything is better with GUI.
Doesn't mean I'm not a fan of DOS...
Title: Re: NXT
Post by: awally88 on August 14, 2010, 07:48:31 AM
@Voyager2 I installed a java machine on my NXT brick. It makes everything so much nicer to use than the Lego GUI.

@RoboMoon Have you tried something even more basic? I've never used Bricx but try using something heaps simple like turning on a motor forever.

task main()
{
      while (1); ///Keep Running forever
     {
           OnFwd(OUT_AC, 70); //Set motor going forward
     }
}
Title: Re: NXT
Post by: voyager2 on August 15, 2010, 06:41:41 AM
Now I am trying to learn NXC but in the mean time, I've become a LEGO NXT-G master...

@RoboMoon i suggest you use NXC, it's based on C.
If you are a "hardcore" NXTer you can probably figure out how to program the ARM and AVR.
Can't remember the name of the ARM but both it and the ATmega48 (which controls the servos) are made by ATmel.