Example application for getting started with the Lego EV3 and Nerves
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:
config/config.exs
and add your access point and wifi drivermix deps.get
mix firmware
mix firmware.burn
iex --cookie democookie --sname me --remsh ev3@nerves-129d
to connect (replace the 129d
part with your ev3'snerves-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
.