BrickPi

A place to discus the development of leJOS for the EV3. Please do not use this section to post questions about how to use leJOS or to report problems etc.
lawrie
leJOS Team Member
Posts: 965
Joined: Mon Feb 05, 2007 1:27 pm

BrickPi

Postby lawrie » Wed May 28, 2014 12:58 pm

There is some experimental support for leJOS on the BrickPi - lejosnews.wordpress.com/2014/05/24/lejos-on-the-brickpi/.

You will need to import the following projects into Eclipse:

- https://github.com/lawrie/BrickPiJava
- https://sourceforge.net/p/lejos/ev3/ci/ ... piclasses/
- https://sourceforge.net/p/lejos/ev3/ci/ ... ickPiTest/

Currently only NXT, not EV3 sensors are supported, and regulated motors are not supported (just NXTMotor).

BrickPiJava needs to be cloned to the Raspberry Pi as well as to Eclipse. Ant build files are used.

If anyone is interested, I can provide more details.

Full leJOS support will probably require custom firmware on the BrickPi.

S.AMU
New User
Posts: 2
Joined: Mon Jan 12, 2015 3:34 pm

Re: BrickPi

Postby S.AMU » Mon Jan 12, 2015 3:39 pm

Hey :) are you still developing on this project?

It would be nice and I would be interested in using this on my brickpi

lawrie
leJOS Team Member
Posts: 965
Joined: Mon Feb 05, 2007 1:27 pm

Re: BrickPi

Postby lawrie » Wed Jan 14, 2015 1:04 pm

Neither Andy nor I have worked on it for some time now. I think we were mainly put off by the difficulty of developing firmware for the BrickPi. We might have another go at it some time, but don't old your breath.

S.AMU
New User
Posts: 2
Joined: Mon Jan 12, 2015 3:34 pm

Re: BrickPi

Postby S.AMU » Sun Jan 18, 2015 10:24 am

:(

develar
New User
Posts: 2
Joined: Mon Nov 09, 2015 9:14 am

Re: BrickPi

Postby develar » Mon Nov 09, 2015 11:02 am

I am going to use Tetrix Max to build a robot. And instead of Lego ultrasonic sensor I want to use LIDAR-Lite.
So, I don't have to buy EV3 set to get details or motors/sensors. I need only a brick. But brick costs an insane price — 220 EUR http://www.amazon.de/dp/B00E1P3ACK. Compare it to Raspberry Pi 2 — A 900MHz quad-core ARM Cortex-A7 CPU and 1GB RAM for the much more reduced price (http://www.dexterindustries.com/shop/br ... indstorms/.

I see https://github.com/DexterInd/BrickPiJava but... leJOS is the main reason why I want to use BrickPi. I am professional java developer and I want to use high-level java library to program my robot (actually, I will use Kotlin language instead of Java). And, indeed, leJOS is impressive.

Could you please explain me why "I think we were mainly put off by the difficulty of developing firmware for the BrickPi"? As far I see here — viewtopic.php?f=18&t=7015 (Device I/O https://wiki.openjdk.java.net/display/dio/Main) it should be easy for any java developer to support devices. And devices is the only platform-dependent code in the leJOS.

So, it is not a complex (in terms of time) task to reimplement platform-dependent code in the leJOS to support BrickPi. Am I right? (I need a support of Tetrix motors/servos and LIDAR-Lite sensor (as far I understand (https://lejosnews.wordpress.com/2015/05 ... ar-sensor/) this sensor is not yet supported anyway)).

User avatar
gloomyandy
leJOS Team Member
Posts: 5055
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: BrickPi

Postby gloomyandy » Mon Nov 09, 2015 11:47 am

The problem is that it is the BrickPi that talks to the underlying hardware (using a couple of Arduinos) and the software that runs on these devices in effect defines what you can do with that hardware. This means that things like low level motor control the sensor interface etc. are defined in the Arduino code. When I last looked this code did not work very well. In theory it is possible to change the firmware used to control the Aruinos but doing so requires hooking up a programming cable to each device and jumping through a number of hoops which makes the process of developing the BrickPi firmware a very painful one.

If you intend to use Tetrix motors via the Tetrix controller then why not simply talk to all of that hardware directly from the Pi and have done with it, no need for a BrickPi at all.
leJOS news https://lejosnews.wordpress.com/

develar
New User
Posts: 2
Joined: Mon Nov 09, 2015 9:14 am

Re: BrickPi

Postby develar » Mon Nov 09, 2015 1:05 pm

Understood, thanks for explanation (BrickPi design).

why not simply talk to all of that hardware directly

I cannot find how to connect HiTechnic DC Motor Controller to PI. There is adapter for myRIO — http://www.tetrixrobotics.com/TETRIX__m ... rd_Adapter, but not for PI.

User avatar
gloomyandy
leJOS Team Member
Posts: 5055
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: BrickPi

Postby gloomyandy » Mon Nov 09, 2015 2:29 pm

The thing is if you use something like the BrickPi you will end up with something that looks like:
rPi ssues commands to BrickPi via UART
BrickPi interprets commands and works out it needs to send i2c commands to the HiTechnic device
Controller gets i2c commands does what is needed and responds
BrickPi reads response and works out what to do with it sends UART response back to rPi
rPi reads and interprets UART response

As you can see there are various stages that things might go wrong and a whole level of code that you have very little control over.

Some other devices like the PiStorms use i2c rather than a UART connection between the rPi and the controller but the overall model is the same.

My understanding is that the HiTechnic device uses i2c as an interface, not sure if it can handle 3.3v logic levels or not but if it can then you may be able just to connect it directly to the rPi i2c lines, if not you may need to use a logic level shifter to get things to work. Either way if it was my project that is the way I would go. But remember one of the things you pay for with a LEGO product is a bunch of protection circuitry and product specification and support. If you try to connect stuff to the rPi and the "magic smoke" escapes you are probably on your own!

Good luck!
leJOS news https://lejosnews.wordpress.com/


Return to “leJOS EV3 Development”

Who is online

Users browsing this forum: No registered users and 1 guest