Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physical connections with PJON-python #2

Open
rtarb41323 opened this issue Dec 20, 2016 · 4 comments
Open

Physical connections with PJON-python #2

rtarb41323 opened this issue Dec 20, 2016 · 4 comments
Labels

Comments

@rtarb41323
Copy link

Greetings! GREAT python library with some great examples! Is it possible, that you could show a list, or schematic, of the connections that you used to test PJON-python on a raspberry pi?

For instance, on a raspberry pi, can I use PJON-python with a single GPIO pin, or do I need to use the UART TX and RX pins?

@gioblu
Copy link

gioblu commented Dec 21, 2016

Ciao @rtarb41323 I am Giovanni, the creator of the PJON protocol.

SoftwareBitBang physical layer is not still implemented (as far as I know) on multitasking machines.
I do think that the implementation proposed in the official repository it is not compatible with concurrency. With this I don't want to say that is impossible but that probably a porting would not work out of the box and simply a fresh codebase with a different approach could be necessary to get it work, but I am so busy I had never the chance to try it out of the box on RPI. What is possible to do, is to use a small arduino device as a router, connecting rpi to it with ThroughSerial strategy and then with another io pin (of the arduino device) instance a new PJON object with SoftwareBitBang having there on one single wire as many devices as you need!

@Girgitt seems now busy, as soon as I will have a feature complete C++ version, will keep back in hands python, fork this repo and make it compliant with the new specification and features recently specified.

@Girgitt
Copy link
Owner

Girgitt commented Dec 21, 2016

@gioblu I did some planning to support v6 but the current level of complexity needs changing a simple port to a more python-specific implementation with a cleaner code and better design patterns for easier maintenance in the long run.

@rtarb41323 just like @gioblu mentioned - for now the easiest way to support communication with SoftwareBitBang strategy from python is to use simple arduino proxy: PJON-python talks over serial to arduino and arduino sends packets to other bus (softwareBitBang) and vice-versa.

@gioblu
Copy link

gioblu commented Dec 22, 2016

Ciao @Girgitt happy to hear from you. This is an amazing news!

@Girgitt
Copy link
Owner

Girgitt commented Aug 4, 2017

As for Aug 2017 only serial strategy is implemented.

However since PJON-python in the current version wraps C++ client compiled from PJON sources (the client is maintained in a sub-project PJON-piper) if additional strategies will be implemented in C++ and made available for RPI and Windows platforms such additional communication strategies will be added to PJON-python.

Currently here are the available options to interface with embedded systems:

  1. Using el-Cheapo board like Arduino Nano: load proxy example code provided with PJON and use such proxy board as a transparent communication gateway to any of the available communication strategies. Proxy board will protect (to some extent) a more expensive PC / RPI platform from damage.
  2. Using USB-RS-485 transceiver to talk directly to many PJON drops using ThroughSerial strategy
  3. Using transparent serial-radio modules like "HC-12" to create half-duplex, multi-drop network based on ThroughSerial strategy.
  4. A mixture of any of the above options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants