But that didn’t work at all. And now I’m bouncing over to ev3dev-stretch-rpi2-generic-2019-03-03.img. Am I missing out on cool things that Raspbian for Robots gives me? Can I install the RforR features on top of the ev3dev base layer? Are these two alternate and orthogonal systems, or am I misunderstanding the relationship?
I’m seeing if I bought the right kit. I have a BrickPi3, and a Raspberry PI 3B+ - “the latest of everything.”
I’d like to code in Java. (Well, Kotlin, but if it runs Java it can run Kotlin)
I’ve been trying to get ev3dev installed, because it provides nice sysfs files for all the sensors and motors, and supports Java. However, I’m not sure this is the correct path - it won’t even boot.
What is the easiest way to for a rpi3b+ to
- run Java
- have some sort of easy access to standard EV3 Sensors and Motors
- enable what the rpi provides (like WiFi and bluetooth)
Is it the BrickPi3? (hopefully yes because I already own it!)
And if yes, which OS? Thanks!
Not sure if you’re still wanting to do this a few months on, but for what it’s worth, I recently bought a used BrickPi+ and below is what I did to get it running on a RPi3B. You mention easy access to motors and sensors in Java; I’m a fan of LeJOS which provides that and more. Although I’m not sure if/how that works with Kotlin.
Download ev3-stretch for RPi 2/3 from the downloads section on the ev3dev website (I would have linked to it but am restricted to including max two links per post as a new user here)- I ended up with version 2019-03-03
Unzipped and burned image file to SD Card (i’m on Win10 and use Win32diskimager)
Use a text editor on the PC to edit config.txt. In my case for the BrickPi+. The instructions are commented within to do the same for the BrickPi3
Eject the SD card and insert in the Pi (with the BrickPi hardware already installed of course)
Fire up the Pi with a fixed ethernet connection, SSH to it with Putty to confirm you now have a working Pi.
Optional but recommended, use connmanctl to give it a fixed IP address, I use 192.168.1.222, (don’t forget to set a nameserver) I also turned off IPV6 because of some name resolution problems
On my PC I then installed a fresh version of Eclipse for Java Developers Version: 2019-06 (4.12.0)
Download the ev3dev-lang-java template project gradle - https://github.com/ev3dev-lang-java/template-project-gradle to the PC, unzip it
Import the gradle project into Eclipse
Edit config.gradle with the ip address of the Pi
If you’re on a windows PC also make these changes https://github.com/ev3dev-lang-java/template-project-gradle/pull/34/files (For background, I logged an issue for this, no. 671 on the ev3dev-lang-java/ev3dev-lang-java GitHub page, again constrained to only two links sorry.)
Now run some gradle tasks to test we can talk to the Pi, I did
here is my output
Image file: ev3dev-stretch-rpi2-generic-2019-03-03 Kernel version: 4.14.94-ev3dev-2.3.2-rpi2 Brickman: 0.10.0 BogoMIPS: 38.40 Bluetooth: Board: board0 BOARD_INFO_HW_REV=A22082 BOARD_INFO_MODEL=Raspberry Pi 3 Model B Rev 1.2 BOARD_INFO_SERIAL_NUM=000000003f81bb99 BOARD_INFO_TYPE=main Board: board1 BOARD_INFO_FW_VER=2 BOARD_INFO_MODEL=Dexter Industries BrickPi BOARD_INFO_TYPE=aux
- Now install Java etc. to the brick using gradle tasks, I ran
getInstaller installJava installJavaLibraries updateAPT uploadGradleLibraries (if you want to use LeJOS)
- Verified the install with gradle task
javaVersion, output as follows:
openjdk version "11.0.4" 2019-07-16 OpenJDK Runtime Environment (build 11.0.4+11-post-Debian-1bpo91) OpenJDK Server VM (build 11.0.4+11-post-Debian-1bpo91, mixed mode, sharing)
BrickPi should now be in a state to be programmed with Java and LeJOS
Attach a large motor to port MA
mainclassparameter in config.gradle with
mainClass = "example.robotics.ev3.actuator.motor.BasicMotorOperationExample"
- Execute gradletask
and that should get your motor running.
Good luck and have fun.
I got it working with a BrickPi3 and a Rpi3B (not-plus) - and everything worked great! The not-plus was the problem, I had to downgrade my rpi by swapping with a friend.
No idea re: the rpi4.