Coder Social home page Coder Social logo

m2x-nerves-test's Introduction

M2X Nerves Test

A test of sending data to M2X using a BeagleBone Black running Elixir and Nerves.

Prerequisites

Pinouts

DGND     (P9-2)
VDD_3.3V (P9-4)
GPIO_26  (P8-14): Switch
GPIO_44  (P8-12): LED (w/ 1k current limiting resistor)

Breadboard Schematic

Configuration

  • Copy config/dev.sample.exs to config/dev.exs.
  • Create an M2X device using the M2X UI.
  • In the M2X UI, create a numeric stream named switch_1.
  • Copy the M2X device ID and API key to config/dev.exs.

Compiling

Set the target hardware to the BeagleBone Black. This only needs to be done once for a given shell session.

export MIX_TARGET=bbb

Fetch the project dependencies:

mix deps.get

Compile the firmware:

mix firmware

Burn the firmware to an SD card:

mix firmware.burn

Insert the card into the BeagleBone Black, power up the board, and monitor the console. If it boots to the onboard flash instead of the SD card, hold down the user button (S2) while rebooting.

Running

Closing the switch (GPIO_26) will send a value of 1 to M2X. Opening the switch will send a value of 0. This will be shown on the M2X stream graph/log.

Run bin/set_led to send an M2X command to turn the LED on(1)/off(0). The API key must be an account master API key.

API_KEY=ABCDE DEVICE_ID=12345 set_led 1

m2x-nerves-test's People

Contributors

amclain avatar

Watchers

James Cloos avatar

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.