Coder Social home page Coder Social logo

lignite's Introduction

Lignite: Program LEGO Mindstorms EV3 in Ruby

Lignite is a set of Ruby tools to interact with LEGO Mindstorms EV3. It uses the original LMS2012 firmware, so ev3dev is not required.

At this point the tools are still rather a thin wrapper so it will be useful to have the EV3 Firmware Developer Kit and EV3 Communication Developer Kit documents at hand for reference: see the "Advanced Users โ€“ Developer Kits" section of the Mindstorms Downloads page.

Gem Version Build Status Code Climate Coverage Status

Features

  • Connect via USB or Bluetooth
  • Execute Direct Commands
  • Execute System Commands, including
    • Upload RBF programs
    • Run RBF programs
  • Compile Ruby into RBF programs
  • Supported platforms: Linux (bug reports or pull requests for Windows or Mac are also welcome)

Getting Started

Running the built-in demo program: Connect the brick with a USB cable. Run

sudo ev3tool start BrkProg_SAVE/Demo.rpf

In the usual case where the folder and the program name are the same, a shortcut works: ev3tool start everstorm is like ev3tool start everstorm/everstorm.rbf.

The sudo is needed to access the USB device. With udev you can configure the system to allow access to all users like this:

echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0005", MODE="0666"' \
  | sudo tee /etc/udev/rules.d/99-org-rubygems-lignite-lego-ev3.rules

To connect with Bluetooth, configure the address and pair the device (FIXME: how; troubleshooting?)

See also the included examples.

Hello World

require "lignite"
dc = Lignite::DirectCommands.new
dc.ui_draw_clean
dc.ui_draw_text(Lignite::FG_COLOR, 20, 40, "Hello, world!")
dc.ui_draw_update

Acknowledgements

Thanks to David Lechner of the ev3dev project for the ev3.yml bytecodes file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.