Coder Social home page Coder Social logo

nerves_docker_starter's Introduction

Getting Started

  • Clone the repo
  • Add a .env file containing:
MIX_TARGET=rpi0
MIX_ENV=prod
WPA_SSID=yourwifissid
WPA_PSK=yourwifipassword

Make sure to update these example values to values relevant to your use case. If you don't intend to use wifi, you can exclude the last two lines.

  • Run docker-compose up -d
  • Enter the container with docker-compose exec nerves bash
  • Create your project with mix nerves.new project_name_here
  • Move the contents of the newly created project up one directory level with mv project_name_here/* ./ and mv project_name_here/.* ./
  • If you want to use the vintage_net_wifi with the project add this to /firmware/config/target.exs:
config :vintage_net,
  regulatory_domain: "US",
  config: [
    {"wlan0",
     %{
       ipv4: %{method: :dhcp},
       type: VintageNetWiFi,
       vintage_net_wifi: %{
         networks: [
           %{
             key_mgmt: :wpa_psk,
             psk: System.get_env("WPA_PSK"),
             ssid: System.get_env("WPA_SSID")
           }
         ]
       }
     }}
  ]
  • Exit the docker container and burn the project contents with sh ./burn.sh
  • If you want to perform over the air updates, make sure to include the IP address of the device on the last line of update.sh
  • Once the device is running on your wifi network, you can update it over the air with sh ./update.sh

nerves_docker_starter's People

Contributors

jasonmj avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

layeddie

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.