Hot answers tagged

3

I've managed to get leJOS working on macOS Sierra, minus Bluetooth support. Bluetooth support is officially broken and has been for a while. There also hasn't been a new release in years, so a fix likely won't come. Otherwise it still works, if you jump through some hoops. Guide: 1. Fantom Driver: First, you need to install the "Fantom driver". You can ...


3

The makers of LeJOS maintain a blog on WordPress: https://lejosnews.wordpress.com/ where they also give tips and write howto's. I think that is the best place to get started, apart perhaps from the LeJOS.org wiki pages which are located here: https://sourceforge.net/p/lejos/wiki/Home/. Those wiki pages tend to have some inconsistencies between versions (...


3

I was able to fix the problem by creating a smaller partition on the SD card. (The idea came from this forum post; it was not necessary for me to buy a different SD card, despite what many people say there.) Using Windows 10, I was able to create a 4 GB partition with the “Computer Management” utility. After that, I used the ev3sdcard.bat utility again, and ...


3

The "forward" and "backward" expressions are only interpreted in the reference frames of the motors themselves and translate to clockwise and counter-clockwise. In your case you must have mounted the motors in a way which requires them to rotate in different directions in order to propel the vehicle. Consider a car with four wheels: in order to go forward, ...


2

Looking at the stack trace in the exception you've posted, the error seems to be coming from a call to RemoteEV3.createRegulatedMotor: at lejos.remote.ev3.RemoteEV3.createRegulatedMotor(Unknown Source) at test_bluetooth.Bluetooth.main(Bluetooth.java:186) After that it's just going through the motions to try and open a port on a remote device... Having a ...


2

The one thing I needed to change to make the above solution work was this: LEJOS_NXT_JAVA_HOME="/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home" I hope this can be of help to someone. Wim


1

I will preface this by saying that I'm just going to summarize what I suggest you do, as writing out the code step-by-step would take quite a while, and you writing the code will help improve your skills. I recommend checking out the LeJOS API while I describe some of the classes, it is pretty easy to look them up there. If you want to know the location of ...


1

You can use the lejos.ev3.robotics.RangeFinder abstraction class: EV3UltrasonicSensor sensorUS; RangeFinder sonar; public UltrasonicSensor(Port port) { sensorUS = new EV3UltrasonicSensor(port); sonar = new RangeFinder(sensorUS); } @Override public boolean takeControl() { return sonar.getRange() < 0.3; } Use the float getRange() method to ...


1

Looking at your code, you're saying: Set the motors to a speed of 300, acceleration of 1000 Run the motors backwards Pause execution of your program for 500ms Stop the motors If you're not seeing colour id 7, go to 1. Assuming that this was exactly the same code you had on the Brick, I'd guess the delays introduced by the communication will cause a ...


Only top voted, non community-wiki answers of a minimum length are eligible