Git Product home page Git Product logo

pyrak811-balena's Introduction

Basic RAK811 example with balenaCloud

This is a basic example on how to use PiSupply IoT LoRa Node pHAT for Raspberry Pi with balenaCloud.

The application will join TheThingsNetwork using OTAA and send the CPU temperature in Cayenne LPP format every 5 minutes.

All you need to do is:

  • Create an application in balenaCloud, add a device, flash the generated image on an SD Card and boot your Raspberry Pi with it
  • When your device appears in the balenaCloud console, go to Device Configuration and ensure that UART is enabled
  • Clone this repository
  • Add the balena repo with
    git remote add balena [email protected]:YourAccount/YourApplication.git
    (copy this line from your balenaCloud console)
  • Push the application to balenaCloud with:
    git push balena master
    The code will be pushed to your device after a few minutes. Note the Device EUI which will be printed in the Logs window.
  • Create an application in TheThingsNetwork and register your device.
    Enter the Device EUI copied from previous step
  • Back to the balenaCloud console, create 2 Service variables:

Your application will restart and send the CPU temperature to TheThingsNetwork every 5 minutes.

Optional Service variables

  • SERIAL_PORT: The default serial port is /dev/ttyS0, depending on your Raspberry Pi model and configuration you might have to override the default (e.g. /dev/ttyAMA0)
  • BAND: The default LoRaWan region is EU868, you can set this variable to match your region (supported regions are: EU868, US915, AU915, KR920, AS923, IN865)

pyrak811-balena's People

Contributors

amedeebulle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shawaj jsteinb4

pyrak811-balena's Issues

Pi Zero hangs at Initializing module

Using PiSupply pHat. I've added RESIN_HOST_CONFIG_dtoverlay = pi3-miniuart-bt as a service var, and as far as I can tell a Pi Zero should use /dev/ttyS0.
It gets to lora.hard_reset() (line 71) and then just hangs there. I suspect it's not communicating correctly over serial, but it's not erroring out either.

Any thoughts ?

Thanks

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.