Skip to content

Multi threaded variant of a sumo bot thrown together at hackaton. Code still has some bugs, like the robot stopping to care about white lines.

License

Notifications You must be signed in to change notification settings

magnusbae/ThreadedLejosSumoBot

Repository files navigation

Forked from: https://github.com/follan/HelloBrick

HelloBrick

This is a simple project for running code on Lego Mindstorms EV3, using leJOS. The project contains a class with helper methods, EV3Helper, which may make it easier to use the device. It also contains a main class and some examples which utilizes the helper methods for some simple movement.

Requirements

This project requires that you have Java Development Kit 7 installed on your system.

Getting Eclipse

There exists a plugin for leJOS to Eclipse, which makes development easy. For convenience we are distributing Eclipse bundled with the Lejos EV3 plugin.

After launching Eclipse, you may have to set EV3_HOME, if it is not set. You can do this by selecting Window -> Preferences -> leJOS EV3. Set EV3_HOME to the leJOS_EV3_0.9.0-beta directory inside the eclipse directory you unpacked.

Creating a project

To create a project select File -> New -> LeJOS EV3 Project. Uncheck Use default location and select the location you placed this project. Make sure the selected JRE environment is JavaSE-1.7. Finally, press Finish.

After creating a leJOS-project, if the leJOS-libraries can't be found, right click on your project and select leJOS EV3 -> Convert to leJOS EV3 project.

Other development methods

If you rather want to set up Eclipse with the leJOS-plugin yourself, you may follow the guide in README-ECLIPSE.md.

If you want to use IntelliJ, you may follow the guide in README-INTELLIJ.md.

If you want to build using Apache Ant instead of Eclipse, you may follow the guide in README-ANT.md.

Running a program

To run a program, right click a file containing a main method, Run As -> LeJos EV3 Program.

Motors and Sensors connections

When seeing the robot from the back, the rightmost motor should be connected to port A, and the left motor should be connected to port B. The wires do not have to cross.

The IR sensor should be connected to port 1, and the color sensor should be connected to port 4.

This is defined in src/no/itera/lego/EV3Helper.java, lines 65, 66, 73, 74, and can be changed.

About

Multi threaded variant of a sumo bot thrown together at hackaton. Code still has some bugs, like the robot stopping to care about white lines.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages