Git Product home page Git Product logo

ev3dev-lang-java's Introduction

ev3dev-lang-java

EV3Dev-lang-Java is project to learn Java and create software for Mindstorms Robots using hardware supported by EV3Dev & the LeJOS way.

License: MIT Travis CI

ScreenShot

How to test?

For non Linux computers use:

./gradlew dockerTest

For Linux computers use:

./gradlew test

Introduction

In Lego Mindstorms ecosystem, the default solution to develop Java software for Lego Mindstorms was LeJOS but now exists one alternative, EV3Dev-lang-java a Java project running on the top of EV3Dev.

Lego Mindstorms ecosystem is a nice educational way to learn Java programming in general and Robotics in particular. Now, it is possible to install a complete Linux distro in the third generation of the product and others companies like Mindsensors & Dexter Industries has released products which interact with Sensors & Actuators from Lego ecosystem and that boards can use the Power of the popular board Raspberry Pi 3

But, with the help of EV3Dev, it is possible to have the same Linux experience for multiple boards. So... why not develop a Java library for that Linux Distro? The answer is EV3Dev-lang-java. The project, takes the good things of both worlds: EV3Dev with the complete linux experience and LeJOS with the rich local navigation stack and the remote support in the future.

What Debian versions are supported with this library?

The library has support for Debian Jessie & Debian Stretch. In this release, we have finished the support for Debian Stretch for EV3 and you could use OpenJDK 11, or OpenJDK 15 and it is amazing!

If you need to use any Raspberry Pi Boards, I recommend to use the stable EV3Dev Debian Jessie release.

What is the hardware platforms supported in this project?

Using the same Java objects, it is possible to deploy the software for Robots on EV3 Brick, Raspberry Pi 3 with BrickPi 3 & PiStorms.

# Element EV3 P-Brick Raspberry Pi 3 Model B+
1 Hardware EV3 Brick BrickPi+, BrickPi3, PiStorms
2 SoC TI Sitara AM1808 Broadcom BCM2837B0
3 CPU 1× ARM926EJ-S @ 300MHz (max 456MHz) 4× ARM Cortex-A53 @ 1400MHz
4 RAM 64 MB LPDDR 1024 MB LPDDR2 (900 MHz)
5 USB Host 1× USB 1.1 (without onboard hub) 4× USB 2.0 (from onboard hub)
6 Year 2010 2018

Project architecture

The project has been designed with the following solution in mind:

# Layer Option 1 Option 2
1 Platforms BrickPi BrickPi3 PiStorms EV3
2 OS Debian Jessie Debian Jessie/Stretch
3 JVM OpenJDK 15 OpenJDK JRI 11 / 12 / 13 / 14 / 15
4 EV3Dev Kernel 4.4.47-19-ev3dev-rpi2 4.14.71-ev3dev-2.3.0-ev3
5 ev3dev-lang-java 0.7.0 2.4.12

Note: At the moment, we will maintain the whole solution until the next LEGO Mindstorms product estimated for next January of 2022.

Features included in the whole project

Java features

  • OpenJDK Java 11/12/13/14/15 support for EV3 Brick, Brickpi+/PiStorms + Raspberry Pi 3
  • Java profiling tools Support (Oracle mission control & JConsole)
  • Logging support based on SLF4J
  • Centralized logs with Kibana

Platform features

  • Support for EV3 Brick, PiStorms v1/v2, BrickPi+ & BrickPi 3

Lego Mindstorms features

  • Regulated Motor Support
  • Unregulated Motor Support
  • Sensor Support (EV3 sensors)
  • Sounds Support
  • EV3 LCD Support

Robotics

Subprojects

Stable projects:

Incubator projects:

  • lejos-navigation: LeJOS navigation stack
  • Usb Devices: A library to use Arduino, Grove Sensors, GPS, IMU, LIDAR, and more devices...
  • ROS: A library to publish Sensor data to ROS for SLAM purposes

Roadmap

Review the backlog to follow the features in course:

https://github.com/ev3dev-lang-java/ev3dev-lang-java/issues

Getting Started

Take a look the documentation to use the project:

http://ev3dev-lang-java.github.io/docs/support/index.html

and use this easy template project with examples to use the project in a quick way:

https://github.com/ev3dev-lang-java/template-project-gradle

Examples

Take a look the following repository to learn how to use this project:

https://github.com/ev3dev-lang-java/examples

Videos

UML Design

ScreenShot

Architecture decision record (ADR)

References:

ev3dev-lang-java's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ev3dev-lang-java's Issues

Install Oracle Java 8 on EV3 Brick

root@ev3dev:/home# java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-2)
OpenJDK Zero VM (build 24.75-b04, mixed mode)

Support for EV3Dev leds

root@ev3dev:# echo 255 > /sys/class/leds/ev3-left0:red:ev3dev/brightness
root@ev3dev:
# echo 0 > /sys/class/leds/ev3-left0:red:ev3dev/brightness

Run Hello World Java on EV3Dev

public class HelloWorld {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World");
    }

}

[OpenCV] Fetch images from a loop

mvn archetype:generate -DgroupId=ev3dev.java.opencv -DartifactId=webcam2 -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Add battery support

Add support for battery.
https://github.com/ev3dev/ev3dev-lang/blob/develop/wrapper-specification.md#direct-attribute-mappings-5

root@ev3dev:/home# ls /sys/class/
backlight  graphics     lego-sensor   pwm           servo-motor  vc
bdi        hidraw       mem           rfkill        sound        video4linux
block      i2c-adapter  misc          rtc           spi_master   vtconsole
bluetooth  i2c-dev      mmc_host      scsi_device   tacho-motor  watchdog
dc-motor   input        mtd           scsi_disk     tty
dma        leds         net           scsi_generic  udc
gpio       lego-port    power_supply  scsi_host     usbmon
root@ev3dev:/home# ls /sys/class/power_supply/
legoev3-battery
root@ev3dev:/home# ls /sys/class/power_supply/legoev3-battery
charge_full_design  device   scope      technology  voltage_max_design
charge_now          power    status     type        voltage_min_design
current_now         present  subsystem  uevent      voltage_now
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/voltage_now
8042133
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/voltage_now
8042133
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/voltage_now
8042133
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/voltage_now
8042133
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/voltage_now
8042133
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/voltage_now
8042133
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/voltage_max_design 
7500000
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/voltage_min_design 
6200000
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/status
Discharging
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/current_now
162666
root@ev3dev:/home# cat /sys/class/power_supply/legoev3-battery/charge_now
2000000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.