Because there was simply no Java library that could control the original LEGO® Education Inventor Hub (51515) with its factory firmware, I built RemoteBrick completely from scratch.
Open-source project → https://github.com/juniorjacki/RemoteBrick
Now you can finally write real Java programs for SPIKE™ Prime and Robot Inventor – no flashing, no Pybricks, no workarounds needed.
RemoteBrick communicates directly with the hub via Bluetooth Classic (SPP) and gives you 100 % of the features the official LEGO app has – just in pure Java.
Current Features in v1.3.0:
Quick Start (3 Steps)
Example – Connect & Drive
import de.juniorjacki.remotebrick.Hub;
import de.juniorjacki.remotebrick.devices.Motor;
import de.juniorjacki.remotebrick.types.*;
public class Demo {
public static void main(String[] args) throws InterruptedException {
try (var hub = Hub.connect("AA:BB:CC:DD:EE:FF")) { // ← your hub's MAC
if (hub == null) {
System.out.println("Connection failed!");
return;
}
Motor left = (Motor) hub.getDevice(Port.A);
Motor right = (Motor) hub.getDevice(Port.B);
// Heartbeat animation + drive forward 3 seconds
hub.getControl().display().animation(Animation.HEARTBEAT, true).send();
hub.getControl().move().startSpeeds(left, right, 75, 75, 100).send();
Thread.sleep(3000);
hub.getControl().move().stop(left, right, StopType.BRAKE).send();
System.out.println("Done! Battery: " + hub.getBatteryPercentage() + "%");
}
}
}