Git Product home page Git Product logo

fipy-gps-accelerometer-lora's Introduction

mcagriaksoy - fipy-GPS-Accelerometer-LoRa GitHub tag License issues - fipy-GPS-Accelerometer-LoRa OS - Linux Hosted with GH Pages OS - Windows

Abstract

Read GPS and Accelerometer values and push them to the remote server via LoRa protocol.

Hardware

FiPy 1.0 with Espressif ESP32

fipy_image

More information at: https://pycom.io/wp-content/uploads/2018/08/fipySpecsheetAugust2017n2-1.pdf

PyTrack Shield to connect FiPy board:

pyTrack_image More information at: https://docs.pycom.io/datasheets/expansionboards/pytrack/

"Multitech Conduit Gateway" as LoRa Gateway LoRa_gateway

More information at: https://www.multitech.com/brands/multiconnect-conduit

Introduction

In this project, I pay attention to consume low power and stability. To decrease power consumption I used Cayenne LPP, Accelerometer sleep - wake up modes and close the unnecessary functions of FiPY. Network: TTN(The things network) https://www.thethingsnetwork.org/

-No payload decoder is required for this project because I used the cayenneLPP library. If I had used other scenarios, I would have required decode my message with the payload decoder tab in the TTN.

Dependency installition

Pytrack: python3 -m pip install PyTrack-NTU

PyCom board information: python3 -m pip install pycom

Usage:

In this project, micropython is used for esp32. More information regarding micro python:

https://github.com/micropython/micropython

https://docs.micropython.org/en/latest/reference/packages.html

CayenneLPP is using to send the data to the TTN network. It is easy because just one click is enough for the decode hex code thanks to cayenneLPP. Just select the option Payload Formats>>Cayenne and decode automatically. Also In python side, we need to add these functions into the code block:

lpp.add_accelerometer(xsum,ysum,zsum)

lpp.add_analog_input(abs(gtotal-1))

lpp.add_analog_input(volt, channel = 114)

lpp.add_gps(c0, c1, 55)

lpp.send()

cayenne_lpp

On the other hand we need to set the settings of LoRa:

lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868,adr=False, tx_retries=0, device_class=LoRa.CLASS_A)

-Required keys can be found on TTN network >> Applications >> Dashboard

dev_addr = struct.unpack(">l", binascii.unhexlify('********'))[0]

nwk_swkey = binascii.unhexlify('***************')

app_swkey = binascii.unhexlify('****************')

lora.join(activation=LoRa.ABP, auth=(dev_addr, nwk_swkey, app_swkey))

s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)

s.setsockopt(socket.SOL_LORA, socket.SO_DR, 0)

print ("LoRa Initialized")

real_example

Cite

If you like this project, please star and cite :)

fipy-gps-accelerometer-lora's People

Contributors

mcagriaksoy avatar

Stargazers

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

Watchers

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