ev3dev is a simple interface to the Lego Mindstorms ev3 robotics platform
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis travis: add .travis.yml Apr 21, 2016
examples examples: fix port names Aug 9, 2018
fb ev3dev/fb: add support for XRGB Aug 9, 2018
motorutil ev3dev: cache invariant tacho motor attributes Sep 30, 2017
otheri2c otheri2c: new package for Other/I2C handling Sep 29, 2017
testmount ev3dev: add testing hooks Sep 21, 2016
.travis.yml travis: require go1.11 Sep 9, 2018
AUTHORS I'm a contributor *and* an author 😄 (#38) Feb 15, 2017
CONTRIBUTORS I'm a contributor *and* an author 😄 (#38) Feb 15, 2017
COPYRIGHT COPYRIGHT: add non-licensed works COPYRIGHT file Apr 19, 2016
GOPHER logo: add gopherbrick Apr 24, 2016
LICENSE LICENSE: update license details for move to github.com/ev3go Apr 21, 2016
README.md README: update tested kernel version notice Aug 29, 2018
buttons.go ev3dev: add sound event support Feb 18, 2017
buttons_test.go Fix buttons since 18-ev3dev kernel (#36) Feb 15, 2017
dc_motor.go ev3dev: cache driver attribute Sep 30, 2017
dc_motor_test.go ev3dev: cache driver attribute Sep 30, 2017
errors.go ev3dev: only allow one handle per device for motors, ports and sensors Oct 14, 2017
errors_test.go ev3dev: allow users to format stack traces Aug 2, 2017
ev3dev.go ev3dev: only allow one handle per device for motors, ports and sensors Oct 14, 2017
ev3dev_conv_test.go travis: update test matrix Apr 11, 2017
ev3dev_test.go ev3dev: test TachoMotor type Sep 30, 2016
evdev.go ev3dev: add sound event support Feb 18, 2017
export_test.go ev3dev: add firmware version accessor Sep 30, 2017
gopherbrick.png logo: use premultipied values rather that opacity Apr 25, 2016
gopherbrick.svg logo: use premultipied values rather that opacity Apr 25, 2016
lcd.go ev3dev: factor framebuffer handling to ev3dev from ev3 and evb Jun 12, 2016
led.go ev3dev: reduce use of fmt calls Sep 18, 2017
led_test.go travis: require go1.11 Sep 9, 2018
lego_port.go ev3dev: generalise comment for ConnectedTo Aug 9, 2018
lego_port_test.go ev3dev: teach ConnectedTo about BrickPi3 port names Aug 9, 2018
linear_actuator.go ev3dev: cache driver attribute Sep 30, 2017
linear_actuator_test.go ev3dev: cache driver attribute Sep 30, 2017
power_supply.go ev3dev: add testing hooks Sep 21, 2016
power_supply_test.go ev3dev: reduce use of fmt calls Sep 18, 2017
sensor.go Revert "ev3dev: handle zero-length commands case" Aug 9, 2018
sensor_test.go ev3dev: cache mode-constant sensor attributes Oct 14, 2017
servo_motor.go ev3dev: cache driver attribute Sep 30, 2017
servo_motor_test.go ev3dev: cache driver attribute Sep 30, 2017
speaker.go ev3dev: add sound event support Feb 18, 2017
stack_test.go ev3dev: allow users to format stack traces Aug 2, 2017
tacho_motor.go ev3dev: cache driver attribute Sep 30, 2017
tacho_motor_test.go ev3dev: cache driver attribute Sep 30, 2017
wait_linux.go ev3dev: add build tags for compilation on other OS Jan 27, 2017
wait_other.go ev3dev: add build tags for compilation on other OS Jan 27, 2017
wait_test.go ev3dev: cache invariant tacho motor attributes Sep 30, 2017

README.md

Gopherbrick

ev3dev is an idiomatic Go interface to an ev3dev device

Build Status Coverage Status GoDoc

The goal is to implement a simple Go style ev3dev API and helpers for common tasks.

github.com/ev3go/ev3dev depends on ev3dev stretch and has been tested on kernel 4.14.61-ev3dev-2.2.2-ev3. For jessie support see the ev3dev-jessie branch.

For device-specific functions see EV3 and BrickPi.

Currently supported:

Low level API

  • Automatic identification of attached devices
  • Buttons /dev/input/by-path/platform-gpio-keys.0-event
  • Power supply /sys/class/power_supply
  • LED /sys/class/leds
  • LCD /dev/fb0
  • Lego Port /sys/class/lego-port
  • Sensor /sys/class/lego-sensor
  • DC motor /sys/class/dc-motor
  • Linear actuator /sys/class/tacho-motor
  • Servo motor /sys/class/servo-motor
  • Tacho motor /sys/class/tacho-motor

Common tasks

  • Steering helper similar to EV-G steering block

Quick start compiling for a brick

Compiling for a brick can be done on the platform itself if Go is installed there, but it is generally quicker on your computer. This requires that you prefix the go build invocation with GOOS=linux GOARCH=arm GOARM=5. For example, to build the demo program you can do this:

$ GOOS=linux GOARCH=arm GOARM=5 go build github.com/ev3go/ev3dev/examples/demo

This will leave a demo executable (from the name of the package path) in your current directory. You can then copy the executable over to your brick using scp.


LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this software.