Giter VIP home page Giter VIP logo

balena-notecard's Introduction

Notecard Balena Block

This is a balena Block for interfacing with the Blues Wireless Notecard.

Add this block to your Balena fleet to easily send data to your cloud backend via a low-power cellular connection.

Prerequisites

To add the Blues Block to your fleet you need to add Blues Wireless connectivity to all of your devices. To you will need to:

And if all of this is new to you, we’d recommend going through the Notecard quickstart tutorial before continuing.

Block configuration

To add the Blues Block, add this service in your docker-compose.yml, as shown below.

  notecard:
    image: "bh.cr/blues_wireless/notecard-<architecture>"
    devices:
      - "/dev/i2c-1:/dev/i2c-1"
    expose:
      - "3434"
    privileged: true

(The currently supported architectures are aarch64, armv6hf, and armv7hf.)

Usage

Once you have everything deployed on your fleet, you can use the Notecard by POSTing JSON requests to http://notecard:3434.

diagram-blues-balena

For example, the following code performs a hub.set command on the Notecard.

import requests

req = {"req": "hub.set"}
req["product"] = "com.company.name:myproject"
req["mode"] = "continuous"

url = "http://notecard:3434"
headers = {"Content-Type": "application/json"}
result = requests.post(url, json=req, headers=headers)

NOTE: See the example-python folder for a full sample script.

Refer to the Notecard quickstart for more information on how to set up and use a Blues Wireless Notecard.

balena-notecard's People

Contributors

tjvantoll avatar mpous avatar bucknalla 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.