Lejos -
Ensure the leJOS libraries are included in your project build path. 3. Your First Program ("Hello World")
Create a new Java class and use the following code to display text on the screen: Ensure the leJOS libraries are included in your
import lejos.hardware.lcd.LCD; import lejos.utility.Delay; public class HelloWorld { public static void main(String[] args) { LCD.drawString("Hello, leJOS!", 0, 0); Delay.msDelay(2000); // Wait for 2 seconds LCD.clear(); } } Use code with caution. Copied to clipboard Copied to clipboard In Eclipse, go to Help
In Eclipse, go to Help -> Install New Software , and use the leJOS update site (found on the leJOS wiki) to install the plugin. Connect the Right-click your project -> leJOS ->
Flash the image onto your microSD card using software like BalenaEtcher. Insert the card into the and boot it up. Connect the
Right-click your project -> leJOS -> Upload and Run on EV3 . 4. Core Concepts & API LeJOS, Java for Lego Mindstorms / Books