How to program LEGO Mindstorms EV3 using C language?
Asked Answered
H

2

12

First of all, I'm new for this and I need a little help!

I have a LEGO Mindstorms EV3 robot, I downloaded (LEGO Mindstorms EV3 Home Edition) to control the EV3. Unfortunately, I couldn't find the source code for the EV3 in the mentioned software. So, please if anybody could tell me the name of the software that enables you to program EV3! I would be most appreciated!

I also downloaded (Bricxcc) software but it was an old version. I couldn't find a newer version which contains EV3.

Can I use C language to program EV3 ? Or to add some features to the sensors?

Note: I ended with leJOS software to program the code with java it is much easier and there are a lot of resources for the EV3 brick in java. Wish you all the best!

Himmler answered 15/2, 2015 at 12:49 Comment(1)
Just a tip: 'robots.txt' is not the tag you want. It's not about robots, it's about web.Promiscuous
C
13

You can find the EV3 source code here: https://github.com/mindboards/ev3sources

The generated documentation from this source code is available here and here.

Bricxcc has some experimental support for EV3 but it is not being actively developed (since Oct. 2013). You can find the latest test version here. Searching the web for "bricxcc ev3" will come up with some tutorials (for example, the one at http://www.robotnav.com looks good).

ROBOTC is a good alternative, although it is not free.

There is also ev3dev. There is a C library for ev3dev here or you can write your own.

Cd answered 15/2, 2015 at 18:27 Comment(2)
Anything in c++? I'm trying to use this within BCI2000, a C++ application suite?Banana
@Horak Check my answer :)Ribonuclease
R
6

The EV3 runs on Linux w/ glibc, so you only need to upload your C programs. For C++ you need to copy over the C++ standard library. Programming like that is a bit inconvenient, as you have to mess directly with the device files.


The c4ev3 bundle streamlines this. It's built around an Eclipse Plugin that includes a GCC Toolchain, an API and an integrated Uploader and File browser usable right out of Eclipse.

C and C++ Hello World template projects are included. API and Uploader are also usable separately from Eclipse, so you can use it however you like.

Check it out :-)


Disclosure: I wrote part of the software.

Ribonuclease answered 8/6, 2016 at 12:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.