Giter Site home page Giter Site logo

esp32-ttnmapper-gps's Introduction

esp32-ttnmapper-gps

Program to make a LoRaWAN node based on the TTGO LoRa 915MHz plus GPS (ATGM336H). The code is configured to connect to The Things Network using US frequency and send the gps values to the ttnmapper

travis license

ttn

Hardware

  • TTGO LORA32 915Mhz (Heltec Wifi LoRa 32)
  • GPS ATGM336H

Images

ttgogps ttnttn

Schematic

ESP32 GPS
5V VCC
GND GND
34 TX
33 RX

Librarys

The Things Network

Application Configuration

First it's a good idea to create a new application, them go on Payload Formats and put the code below.

payload

function Decoder(bytes, port) {
  // Decode an uplink message from a buffer
  // (array) of bytes to an object of fields.
  var decoded = {};
  // if (port === 1) decoded.led = bytes[0];
  decoded.lat = ((bytes[0]<<16)>>>0) + ((bytes[1]<<8)>>>0) + bytes[2];
  decoded.lat = (decoded.lat / 16777215.0 * 180) - 90;
  decoded.lon = ((bytes[3]<<16)>>>0) + ((bytes[4]<<8)>>>0) + bytes[5];
  decoded.lon = (decoded.lon / 16777215.0 * 360) - 180;
  var altValue = ((bytes[6]<<8)>>>0) + bytes[7];
  var sign = bytes[6] & (1 << 7);
  if(sign)
  {
    decoded.alt = 0xFFFF0000 | altValue;
  }
  else
  {
    decoded.alt = altValue;
  }
  decoded.hdop = bytes[8] / 10.0;
  return decoded;
}

Next go on integration and add a integration TNN Mapper. (It's a good idea to add a experiment name)

integration

With the experiment name is possible to check only the experiment criciuma. More information on the TTN Mapper Documentation.

Node

Create a new device and goes to setting, change the Activation Method to ABP and disable the Frame Counter Check, them save.

abp

Next goes to Overview on the bottow Example Code.

node

Copy the code and replace on the sample code (esp32-ttnmapper-gps.ino).

If your board is diferent from the Heltec Wifi LoRa 32 you should check the pins connection on lmic_pins.


Do you like this? Please star this project on GitHub!

esp32-ttnmapper-gps's People

Contributors

ricaun avatar leoverto 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.