-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Steps:
- Identify Interfaces & classes from LeJOS
- Implement a prototype
- Implement a stable solution
- Develop tests
- Move to
LeJOS commons
the missing interfaces & classes - Review on internet the majority of Use cases from Users
- Review how to include the concept about
BrickPi
Motivation:
Many users use the library to build software for robots in Mindstorms
ecosystem, but in order to go further with the idea to have robots based on multiple bricks, it is necessary to implement the concept about LocalEV3
.
In LeJOS ecosystem, LocalEV3 is a recent concept appeared in EV3:
http://www.lejos.org/ev3/docs/lejos/hardware/ev3/LocalEV3.html
Note: If you are going to use only one Brick, you could use directly the objects that you need to use in your program, but if you are going to use Remote capabilities, RemoveEV3 is necessary. In order to begin that journey, it is necessary to provide a LocalEV3
support.
Some examples using LocalEV3
Brick brick = BrickFinder.getLocal();
Audio sound = brick.getAudio();
sound.systemSound(0);
RegulatedMotor left = new EV3LargeRegulatedMotor(brick.getPort("B"));
RegulatedMotor right = new EV3LargeRegulatedMotor(brick.getPort("C"));
// get a port instance
Port port = LocalEV3.get().getPort("S2");
// Get an instance of the Ultrasonic EV3 sensor
EV3UltrasonicSensor sensor = new EV3UltrasonicSensor(port);
GraphicsLCD g = LocalEV3.get (). GetGraphicsLCD ();
BrickInfo[] bricks = BrickFinder.discover();
for(BrickInfo info: bricks) {
Brick brick = new RemoteEV3(info.getIPAddress());
brick.getAudio().systemSound(0);
}
Article:
https://sourceforge.net/p/lejos/wiki/Remote%20access%20to%20an%20EV3/
Related issue:
#524
References:
Brick Capabilities:
- https://github.com/ev3dev-lang-java/lejos-ev3-code-mirror/blob/master/ev3classes/src/lejos/hardware/ev3/LocalEV3.java
- https://github.com/ev3dev-lang-java/lejos-ev3-code-mirror/blob/master/ev3classes/src/lejos/hardware/ev3/EV3.java
- https://github.com/ev3dev-lang-java/lejos-ev3-code-mirror/blob/master/ev3classes/src/lejos/hardware/Brick.java
- http://www.lejos.org/ev3/docs/lejos/hardware/Audio.html
- http://www.lejos.org/ev3/docs/lejos/hardware/Sounds.html
- http://www.lejos.org/ev3/docs/lejos/hardware/lcd/GraphicsLCD.html
- https://github.com/ev3dev-lang-java/lejos-ev3-code-mirror/blob/master/ev3classes/src/lejos/internal/ev3/EV3LCDManager.java
- http://www.lejos.org/ev3/docs/lejos/hardware/Power.html
- http://www.lejos.org/ev3/docs/lejos/hardware/port/Port.html
Wifi capabilities:
- https://github.com/ev3dev-lang-java/lejos-ev3-code-mirror/blob/master/ev3classes/src/lejos/hardware/BrickFinder.java
- https://github.com/ev3dev-lang-java/lejos-ev3-code-mirror/blob/master/ev3classes/src/lejos/hardware/Wifi.java
- https://github.com/ev3dev-lang-java/lejos-ev3-code-mirror/blob/master/ev3classes/src/lejos/hardware/LocalWifiDevice.java
- https://github.com/ev3dev-lang-java/lejos-ev3-code-mirror/blob/master/ev3classes/src/lejos/internal/io/NativeWifi.java
Offtopic examples:
- https://github.com/bartgerard/alpha/blob/master/robot/service/src/main/java/be/gerard/robot/LejosExperiment.java
- https://github.com/david78k/EV3/blob/master/ev3-lejos/src/RemoteControl.java