Giter Club home page Giter Club logo

rak811-python's Introduction

rak811-python

RAK811 Python Library for use with LoRa pHAT & MicroBIT Node

Currently the library is very early on in development. At the moment you will have to do the following:

Connect via SSH or open a terminal up.

Run sudo raspi-config Select option "5 Interfacing Options" Then select option "P6 Serial"

It will ask you if you want a login shell to be accessible over serial, select no. It will then ask you if you would like the serial port hardware to be enabled, select yes.

Press enter and then finish. It will ask if you would like to reboot and select yes.

It'll reboot and then either re-connect or re-open a terminal.

Next download the python file to a directory you wish, currently it isn't available via Pip but will be soon.The easiest way is to wget https://raw.githubusercontent.com/PiSupply/rak811-python/master/iotloranode.py

Finally you will need to install python serial which can be done with "sudo apt install python3-serial python3-rpi.gpio"

We're still working on the documentation and all of the functions but you can see an example at https://github.com/PiSupply/rak811-python/blob/master/example.py to get started.

rak811-python's People

Contributors

ryanteck avatar

Stargazers

Radek avatar Mike DemonDad avatar Andri avatar Harald Martin Aarbogh avatar  avatar Robert Bricheno avatar

Watchers

James Cloos avatar  avatar Aaron Shaw avatar

rak811-python's Issues

python 2 issues

File "carTest.py", line 15, in
node.send_string_packet("Hello World")
File "/home/pi/rak811-python/iotloranode.py", line 200, in send_string_packet
self.uart_tx(command)
File "/home/pi/rak811-python/iotloranode.py", line 74, in uart_tx
self.serial_write(str.encode(command))
TypeError: descriptor 'encode' requires a 'str' object but received a 'unicode'

Change serial port to use /dev/serial0

On RPi 3, 3B+, 3A+ & Zero W the /dev/ttyAMA0 port is used by the bluetooth adaptor as default.

/dev/serial0 seems to route AMA0 or the Miniuart port depending on what is "connected" to the GPIO at the time.

While the hardware UART is usually preferred if we change to using /dev/serial0 then if the user hasn't configured it it should still work.

I believe it'll be best to change to using /dev/serial0 for the library. At the same time adding a way for the user to specify the port manually if they wish.

Before implementing I'll do an approximate 24 hour test transmitting continuously for 24 Hours. This'll be a total of around 12,300 Times.

If there's little to no issues then this change will be made.

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.