MajorAlvega

[EV3DEV] EV3Dev General Discussion

Recommended Posts

Hi Jim.

Could you please add ev3dev website (https://www.ev3dev.org/) to the Index?

ev3dev is a linux distribution initially built for the EV3 but now also supporting Raspberry Pi and Beagle Bone and some 3rd party MINDSTORMS-compatible platforms like the BrickPi.

ev3dev is also much more than 'just' an operating system - it includes several projects like 'lego-linux-drivers' that allows any (modern) linux system to use LEGO devices (for instance using WeDo USB Hub on a laptop) and also some language bindings to allow using python, java, C, javascript with MINDSTORMS hardware. There is even a project that brings leJOS it, allowing leJOS users to escape from some limitations of the leJOS main project.

I'm not a member of the ev3dev team but use it for some projects and I'll be happy to answer (of at least forward) any questions.

Share this post


Link to post
Share on other sites

That's that part of bringing leJOS into ev3dev :)

The ideia is implementing a Java runtime environment over the linux operating system, like leJOS does. But leJOS uses a very light and limited version of a linux system (like EV3 itself does when you are using native firmware only). No problem with that... unless you want to use a device or a library not supported by  leJOS. Also leJOS uses a rather old JRE version, this project tries to use a much more recent (last month they announced OpenJDK 12).

https://ev3dev-lang-java.github.io/docs/support/about/ev3dev-java.html

one of the interesting things on this project is the inclusing of OpenCV (Open Source Computer Vision Library). Since ev3dev natively supports the old LEGO USB camera (and also modern USB webcams, with some limitations) you can use Java on your EV3 robot to recognize objects with just LEGO components.

Of course you can use a webcam and OpenCV without Java, just install pure ev3dev and then install OpenCV and use your the language of your choice like python or C... or even just bash scripting if you are already a linux average user. Almost everything that you can do with a Raspberry Pi or a a linux laptop is possible on the EV3 (and if you have a BrickPi then everyhting is really possible since the CPU is much more powerfull and the better architecture means much more libraries/packages are alreasdy available).

 

Share this post


Link to post
Share on other sites
Just now, MajorAlvega said:

Also leJOS uses a rather old JRE version, this project tries to use a much more recent (last month they announced OpenJDK 12).

...

I read this yesterday indeed. 

Looks like this could be THE environment for me. Reliving the good old Java days hehe.

Do you use Eclipse for this as well?

Share this post


Link to post
Share on other sites

I think so.

But I never used... i have used leJOS 2 or 3 times (with Eclipse) but I have a long-lasting problem with Java since the 90's that never really went away :)

There is a Facebook group for discussing leJOS and evdev-lang-java, Juan Antonio Breña Moral is active there and he is responsible for ev3dev-lang-java.

And there is also a Facebook group for ev3dev but not so active - github site is much more active.

Share this post


Link to post
Share on other sites
Just now, MajorAlvega said:

But I never used... i have used leJOS 2 or 3 times (with Eclipse) but I have a long-lasting problem with Java since the 90's that never really went away :)

:laugh:

Off-topic (slightly): what is your preferred environment/OS for the EV3?

Thanks for the resources. I will join the FB group!

Share this post


Link to post
Share on other sites

ev3dev as the OS, undoubtedly.

I am not a programmer - I am an electronics engineer with a background on robotics and had to program at university but I really don't program on a regular basis. But I'm a good googler and can tweak my scripts to do what I need them to do, even if ugly and/or inefficiently.

I started using ev3dev because it is Debian based like Raspbian (the OS for Raspberry Pi) and Ubuntu (the OS I use on my job's computer). So I can test almost everything on my laptop, transfer to ev3dev or the Pi and and with a few minor adjusts it works.

Also ev3dev is a full OS - if you have some gadget or protocol you want to use with your robot/automated MOC you probably can use it with ev3dev. Fingerprint reader? NFC reader? webcam? printer? chromecast? bluetooth speaker? Google Cloud API? Bluetooth BLE devices like the SBrick, the WeDo 2.0, the BOOST, Powered Up? Arduino? IoT?  Been there, done that (OK, I might be bragging... a bit :D )

Honestly, I wish the next MINDSTORMS would have just a few more MHz and something like the ev3dev inside... it would be an awesome platform.

Share this post


Link to post
Share on other sites

LoL :laugh:

Sounds great!

I just bit the bullet and started my ev3dev project. And I immediately faced an impediment. I onlyl have 64GB microSD cards :tongue:

Share this post


Link to post
Share on other sites

I am about to order some SDHC cards. Can I get cheap 8GB cards or is it better to get cards with higher write/read speed?

Usually I would go for the better ones, but since I will be needing four cards, I like to know if it actually matters.

Share this post


Link to post
Share on other sites

I think I already asked, so sorry for asking again; does ev3dev support daisy chaining? I can remember reading that the Python version does support daisy chaining. And I see that Python can be run in Visual Studio Code, which is a big plus for me. So, maybe I need to dive into Python after all :laugh:

Share this post


Link to post
Share on other sites

Great - welcome to the Dark Side ;)

About SD cards, there are some differences but not so important unless you are going to make programs that read and write a lot on card or use so much memory that need a big swapfile on disk (the default swapfile is compressed, on RAM, to speed things up). David Lechner made a small benchmark and I also made a test with 2 or 3 of the available here in Portugal, inline with his findings.

The available bindings for ev3dev, as far as I know, do not support daisy chainning.
The python documentation sugests RPyC and I've used it two or three times, it's powerfull but requires python on all sides so for my needs I prefer to use mosquitto (MQTT) to pass data to/from EV3, Arduino, laptop, Android... It's a light message queuing protocol that was rediscovered recently on IoT projects. I wrote a small tutorial for the ev3dev site and if you search Youtube for ev3dev and MQTT you will find a few examples. MQTT is asynchronous so it might not suit your needs if you require fine synchronization . But you can use other libraries and try UDP... open an issue in ev3dev, someone more expert will help.

Another note for python... the armel 1-core CPU and just 64 MB are bad for the initialization times of python... some programs can take 15 to 30 seconds to initialize before you can use them. David Lechner also ported a micropython version, less complete than the full python but much more lighter and faster... have a look.

Share this post


Link to post
Share on other sites

Thanks Major! This is very useful and interesting information.

I don't really object 15 to 30 seconds for startup, but it can be cumbersome when you are still developing the software. I will take a look at micropython

Regarding the sdcards, David Lechner states

"So, based on my results, the clear winner is the SanDisk Extreme."

Well, I just bought one of those cards, so I'm good :laugh:

I decided to create a new topic for my venture into the world of ev3dev and Python and I have turned this topic into the General Discussion topic.

Share this post


Link to post
Share on other sites
On 11/18/2018 at 2:24 PM, Jim said:

I think I already asked, so sorry for asking again; does ev3dev support daisy chaining? I can remember reading that the Python version does support daisy chaining. And I see that Python can be run in Visual Studio Code, which is a big plus for me. So, maybe I need to dive into Python after all :laugh:

There is an issue open for this here:

https://github.com/ev3dev/ev3dev-lang-python/issues/385

But nobody has worked on it yet.  It is still possible to have multiple ev3dev bricks communicate with each other though, you just have to do some client/server coding in python.

I do a lot of work on ev3dev-lang-python, there is a small but pretty active group of contributors for it.  We have a separate repo of demo programs for some of the more popular builds (see https://github.com/ev3dev/ev3dev-lang-python-demo ). There are demo programs for:

  • BALANC3R
  • EDUCATOR
  • EV3D4
  • EV3RSTORM
  • EXPLOR3R
  • GRIPP3R
  • MINDCUB3R
  • R3PTAR
  • TRACK3R

 

19 hours ago, Jim said:

I don't really object 15 to 30 seconds for startup, but it can be cumbersome when you are still developing the software. I will take a look at micropython

Another good option (if you have one) is to use a raspberry pi3 with a brickpi.  I do most of my dev on that just because it is so much faster than an ev3.

Share this post


Link to post
Share on other sites
1 hour ago, dr_spock said:

Is there is a version of BASIC for ev3dev?

 

Not for ev3dev specifically.

There are several basic packages in the Debian repositories. There is at least one (bwbasic) still available for the architecture of the EV3 ('armel', not the modern 'armhf' like Raspberry Pi). So you can run bwbasic on the EV3. But since there are no bindings for the EV3 hardware you cannot make direct use of things like motors or sensors, you will need to make system calls to external commands (like bash scripts or python scripts).

Probably not what you are interested. if you really need BASIC look for ev3basic.

Share this post


Link to post
Share on other sites

Thank you for the information.  I have ev3basic.  It doesn't work with my non-official TP-Link wifi dongle.  The dongle does work with ev3dev.  I suppose I'll have to learn Python to connect my EV3 with other TCP/IP devices. 

Share this post


Link to post
Share on other sites
5 hours ago, dr_spock said:

Thank you for the information.  I have ev3basic.  It doesn't work with my non-official TP-Link wifi dongle.  The dongle does work with ev3dev.  I suppose I'll have to learn Python to connect my EV3 with other TCP/IP devices. 

Join me on my Python journey! :classic: 

There’s quite a bit of support here, so we can make it happen.

Share this post


Link to post
Share on other sites
18 hours ago, Jim said:

Join me on my Python journey! :classic: 

There’s quite a bit of support here, so we can make it happen.

I think I'll be doing that.  :classic:

 

Share this post


Link to post
Share on other sites
On 11/24/2018 at 1:28 AM, dr_spock said:

I think I'll be doing that.  :classic:

I'm making progress quite fast and I had zero knowledge of Python and Linux.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.