Another Segway Again

Post your NXJ projects, project ideas, etc here!

Moderators: roger, imaqine, 99jonathan

bjoek
New User
Posts: 1
Joined: Mon Mar 24, 2014 12:42 pm

Another Segway Again

Postby bjoek » Mon Mar 24, 2014 1:07 pm

Hi!

I am pretty new to the world of leJOS programming. Just like anybody else, my first project is to create a segway using the segoway class.
But nothing happens. Now i'm already sitting in front of my laptop for about 5 hours and is won't find the problem :(

I'm currently using the leJOS NXJ 0.9.1 and Eclipse.

Code: Select all

public class segway {

   public static void main(String [] args) throws InterruptedException {
      NXTMotor left = new NXTMotor(MotorPort.A);
      NXTMotor right = new NXTMotor(MotorPort.C);
      
      GyroSensor g = new GyroSensor(SensorPort.S1);
            
      Segoway balance = new Segoway(left,right,g,4.32);
   }
}


When running the program, it dies right after calibrating. What should i do?

User avatar
gloomyandy
leJOS Team Member
Posts: 4698
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Another Segway Again

Postby gloomyandy » Mon Mar 24, 2014 3:22 pm

Perhaps you should start with a simpler project? A Segway is a pretty complex first project. Take a step back and try doing something simpler to begin. That way you will be able to develop the knowledge needed to debug things like this when they go wrong.


Return to “NXJ Projects”

Who is online

Users browsing this forum: No registered users and 1 guest