Giter VIP home page Giter VIP logo

nerves_ev3_example's Introduction

Nerves Lego EV3 Example

To try this out, you'll need an EV3 and a WiFi adapter. See https://github.com/nerves-project/nerves_system_ev3 for supported WiFi adapters. Also, keep in mind that support for the EV3 is in progress. Having a console adapter will come in handy.

Here are the steps:

  1. Edit config/config.exs and add your access point and wifi driver
  2. mix deps.get
  3. mix firmware
  4. Connect a MicroSD card to your computer.
  5. mix firmware.burn
  6. Put the MicroSD card in the EV3 and power off the EV3
  7. Watch the display. It should eventually show an IP address.
  8. On your computer, run iex --cookie democookie --sname me --remsh ev3@nerves-129d to connect (replace the 129d part with your ev3's id. It will be on the display). If your router doesn't supply local DNS, you'll need to add nerves-129d to your /etc/hosts.

Once you connect, you'll want to do stuff with Lego sensors and motors that you may have attached to your EV3. The docs for doing this can be found on the ev3dev website and pretty much just need to be translated from shell commands (you could use :os.cmd if you want) to Elixir File calls. For example, if you have a motor, see the tacho-motor instructions.

If you have a console adapter and want to do some debugging with this project, you'll need to do two things. The first is to switch the TTY to ttyS1 in config/rootfs-additions/etc/erlinit.config. The second is to comment out the NervesEv3Example.Display worker so that it doesn't start in lib/nerves_ev3_example.ex.

nerves_ev3_example's People

Contributors

fhunleth avatar mobileoverlord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nerves_ev3_example's Issues

Kernel panic while booting Nerves EV3 example

Environment

  • Erlang version (erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell):
    19
  • Elixir version (elixir -v):
    1.3.1
  • Operating system:
    Arch Linux
  • Nerves Environment Info:
    nerves_system 0.1.6
    nerves_system_br 0.7.0
    nerves_system_ev3 0.7.0; more below

Current behavior

A kernel panic occurs, complaining about no working init found:
https://gist.github.com/arjan/c4011f7aa6c81fc1d9581ac97be9f467

Expected behavior

It boots..

cc @danielwillemse

Full mix.lock:

~/tmp/nerves_ev3_example> cat mix.lock 
%{"bbmustache": {:hex, :bbmustache, "1.0.4", "7ba94f971c5afd7b6617918a4bb74705e36cab36eb84b19b6a1b7ee06427aa38", [:rebar], []},
  "cf": {:hex, :cf, "0.2.1", "69d0b1349fd4d7d4dc55b7f407d29d7a840bf9a1ef5af529f1ebe0ce153fc2ab", [:rebar3], []},
  "elixir_make": {:hex, :elixir_make, "0.4.0", "992f38fabe705bb45821a728f20914c554b276838433349d4f2341f7a687cddf", [:mix], []},
  "erlware_commons": {:hex, :erlware_commons, "0.21.0", "a04433071ad7d112edefc75ac77719dd3e6753e697ac09428fc83d7564b80b15", [:rebar3], [{:cf, "0.2.1", [hex: :cf, optional: false]}]},
  "ex_ncurses": {:git, "https://github.com/fhunleth/ex_ncurses.git", "85cca394d1e638486fd34744494ce023b16420df", [branch: "bump_deps"]},
  "exrm": {:hex, :exrm, "1.0.8", "5aa8990cdfe300282828b02cefdc339e235f7916388ce99f9a1f926a9271a45d", [:mix], [{:relx, "~> 3.5", [hex: :relx, optional: false]}]},
  "getopt": {:hex, :getopt, "0.8.2", "b17556db683000ba50370b16c0619df1337e7af7ecbf7d64fbf8d1d6bce3109b", [:rebar], []},
  "logger_file_backend": {:hex, :logger_file_backend, "0.0.9", "5c2f7d4a28431e695cdf94d191523dbafe609321a67bb654254897f546c393db", [:mix], []},
  "nerves": {:hex, :nerves, "0.3.4", "7de99513f2775633e2db00acbf7437c55bd132f19b7406814f50818702b381b5", [:mix], [{:exrm, "~> 1.0.6", [hex: :exrm, optional: false]}]},
  "nerves_interim_wifi": {:hex, :nerves_interim_wifi, "0.0.2", "51c51578fc0a5d929a8ea26d54e6f470bcca24762742473cb44be3a622458a98", [:make, :mix], [{:elixir_make, "~> 0.3", [hex: :elixir_make, optional: false]}, {:nerves_network_interface, "~> 0.3.1", [hex: :nerves_network_interface, optional: false]}, {:nerves_wpa_supplicant, "~> 0.2.2", [hex: :nerves_wpa_supplicant, optional: false]}]},
  "nerves_network_interface": {:hex, :nerves_network_interface, "0.3.2", "e7450f7eccd7387ceebee6096a0646bcdc0dd4aa77077e5fa81f6767da9b77af", [:make, :mix], [{:elixir_make, "~> 0.3", [hex: :elixir_make, optional: false]}]},
  "nerves_system": {:hex, :nerves_system, "0.1.6", "d3cff2ae40d3764c75b187cbbdb09985ae169489c26178d765edc9b66bc4e355", [:mix], []},
  "nerves_system_br": {:hex, :nerves_system_br, "0.7.0", "e838dbec1079fa326d958a3aef4ee14f22d8ffbc91ce7f6b28fc7d9f3197dfa7", [:mix], []},
  "nerves_system_ev3": {:hex, :nerves_system_ev3, "0.7.0", "dc2ff4d479ce1c81f45bfa7771e10777da4383286acc87f6f3fdc65dc4347eb0", [:mix], [{:nerves_system, "~> 0.1.4", [hex: :nerves_system, optional: false]}, {:nerves_system_br, "~> 0.7.0", [hex: :nerves_system_br, optional: false]}, {:nerves_toolchain_armv5tejl_unknown_linux_musleabi, "~> 0.7.0", [hex: :nerves_toolchain_armv5tejl_unknown_linux_musleabi, optional: false]}]},
  "nerves_toolchain": {:hex, :nerves_toolchain, "0.7.1", "164f5fcf07f717d5e8f918965ea043c860b75065768c93a726f763498a7d8792", [:mix], []},
  "nerves_toolchain_arm_unknown_linux_gnueabi": {:hex, :nerves_toolchain_arm_unknown_linux_gnueabi, "0.6.2", "a8bbfb30bb11b9c0115643feb6d1980335e267c3ea8533d8918863fae6797295", [:mix], [{:nerves_toolchain, "~> 0.6.2", [hex: :nerves_toolchain, optional: false]}]},
  "nerves_toolchain_armv5tejl_unknown_linux_musleabi": {:hex, :nerves_toolchain_armv5tejl_unknown_linux_musleabi, "0.7.1", "43909a7aeab85e4d0a81c8b8f97b053b2975accdc0b04096ce5f8781bfbb63f0", [:mix], [{:nerves_toolchain, "~> 0.7", [hex: :nerves_toolchain, optional: false]}, {:nerves_toolchain_ctng, "~> 0.7", [hex: :nerves_toolchain_ctng, optional: false]}]},
  "nerves_toolchain_ctng": {:hex, :nerves_toolchain_ctng, "0.7.1", "6f46b1591b23d1a017347f8cd9962c24775b2a6fde4e2f2b5251439efef8d6a4", [:mix], []},
  "nerves_wpa_supplicant": {:hex, :nerves_wpa_supplicant, "0.2.2", "da829baec94a8afa7da3a6beaaf1725b9ca7f5f58779ba50b73568b7d37d3d98", [:make, :mix], [{:elixir_make, "~> 0.3", [hex: :elixir_make, optional: false]}]},
  "porcelain": {:hex, :porcelain, "2.0.1", "9c3db2b47d8cf6879c0d9ac79db8657333974a88faff09e856569e00c1b5e119", [:mix], []},
  "providers": {:hex, :providers, "1.6.0", "db0e2f9043ae60c0155205fcd238d68516331d0e5146155e33d1e79dc452964a", [:rebar3], [{:getopt, "0.8.2", [hex: :getopt, optional: false]}]},
  "relx": {:hex, :relx, "3.21.1", "f989dc520730efd9075e9f4debcb8ba1d7d1e86b018b0bcf45a2eb80270b4ad6", [:rebar3], [{:bbmustache, "1.0.4", [hex: :bbmustache, optional: false]}, {:cf, "0.2.1", [hex: :cf, optional: false]}, {:erlware_commons, "0.21.0", [hex: :erlware_commons, optional: false]}, {:getopt, "0.8.2", [hex: :getopt, optional: false]}, {:providers, "1.6.0", [hex: :providers, optional: false]}]}}

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.