I used this once to have an Arduino and an ESP8266 communicate and I love it. I'm not great with C++, and I found the super simple implementation extremely helpful, as I could focus on what I wanted to do rather than have to wrestle with the protocol. The one-wire connection is similarly a boon to speed, since I don't need to connect a bunch of stuff up, I just connect one wire and that's it. The author was also very responsive, helping me immediately with a bug I found.
I definitely recommend it for most use cases, if you don't need a very high speed bus.
This is an abstract network stack for raspberry pi- type devices so they can talk to each other while sheltered from the underlying network interface (wifi, radio, wire, light impulses, etc) and sits on top of whatever transport protocol (UDP, TCP, Serial). By "multi-media" he means the physical layer, "media like electricity, radio and light"
ciao dustin, more than "abstract" I would say "software defined" or "software emulated". Yes, data-links are abstracted and treated by PJON "agnostically". PJON can also use higher level protocols like UDP TCP as "data-links". I think this, although could be considered by many as a layering violation, may be extremely useful for building a decentralized network infrastructure while still having the chance to hop through the internet if required
Also check out the related ModuleInterface library (https://github.com/fredilarsen/ModuleInterface) that lets devices declare their contracts for settings, outputs and inputs and a master that synchronizes these between modules and to and from a web server / database.
It does data logging and storage to a database for trending and/or analysis, as well as configuration in a web page.
It uses PJON as transport, so it can run on one or multiple of the supported media, for example a SoftwareBitBang bus between worker devices, with a router that connects them via UDP to a master process on Linux. Or any other combination.
PJON is a very interesting project and I've used it in the past between a RPi and an Arduino to communicate.
Atm I'm developing my own bus protocol since PJON was having some problems with the optocouplers I have (the line I need has almost a millisecond of lag and doesn't allow for a frequency beyond a couple kilohertz as it needs to get to several devices at different logic levels and has some longer lines with higher voltages that limit response times). Surprisingly there isn't a good bus protocol that can deal with symbolrates below 1000 per second, multi master and really bad line conditions and long timeouts.
Simple NRZ for both clock and data. Data integrity is provided by parity bits in various fields and CRC32 for the payload.
I use token bus for media access control since it's fairly simple to implement and I don't need jam detection in any components.
Token passing enables a far more simpler software for simply being a passive client (ie, a sensor doesn't need to be able to control the bus, it only needs to respond while someone else is controlling the bus) and the active masters (which can cleanly pass control of the bus).
I don't mean any of this as offense to PJON either, it's an amazing protocol, the problems I have aren't solved by any product on the market.
NRZ is easier to do on most devices since you simply put a high on the bus to send a one and a low on the bus to send zero, esp. if you use something like an Attiny. Also means I can basically plug-and-play it into the i2c connections I have setup.
I’m about to start a project where four Arduinos will be talking to each other every other minute and also to a central server ~100 times a second and haven’t really found a satisfactory way to handle the communication. Had been hoping to use ZeroMQ as I have some experience with that but it looks like there are no Arduino compatible libraries available.
However, this looks just like the thing I’ve been looking for. Serial communication and TCP and CRC checking!
Protocol cannot be open source. It can have a full specification published. A protocol does not have a source code, it's something that its implementation can have.
Also, what the heck does it do? Neither README nor title says anything about that. The closest thing to such description is mentioning that it "supports multimedia", whatever that means.
Please don't go into attack mode here. The last thing someone needs when they take the risk of sharing their work on a large public forum is someone pettily berating them and then hounding them when they try to reply. If you were genuinely interested in getting information or providing feedback, there are lots of ways to do it that don't come across as just wanting to pound something.
Edit: it looks like we've already had to warn you about not being a bully on Hacker News. Moreover, it looks like you've been posting like this a lot. This is something we ban accounts for if people keep doing it, so please take the spirit of this site to heart and treat your fellow community members better from now on.
> Edit: it looks like we've already had to warn you about not being a bully on Hacker News. Moreover, it looks like you've been posting like this a lot.
OK then, please be more specific here. You're being so generic that I can't
tell what exactly is wrong with my posts (apart from being disliked) and what
should I change to keep me from being banned. The only thing I can think of is
to stay away from any commenting at all. If you criticise from your high
horse of being a moderator and wielding the power to ban people, at least be
constructive in doing so.
Ciao dozzie, I have omitted "implementation" from the title because I thought that was obvious enough. It seems not.
The project proposes both an independent research in defining a specification, and also an open-source implementation based on that specification.
If you want to know what it does, read the specifications or at least the first sentences of the README :)
"PJON® (Padded Jittering Operative Network) is an Arduino compatible, multi-master, multi-media network protocol. It proposes a Standard, it is designed as a framework and implements a totally software emulated network protocol stack that can be easily cross-compiled on many architectures like ATtiny, ATmega, ESP8266, ESP32, STM32, Teensy, Raspberry Pi, Linux, Windows x86 and Apple machines. It is a valid tool to quickly and comprehensibly build a network of devices. Visit wiki and documentation to know more about the PJON Standard."
I think the OP’s critique of your README being vague is fair. Although judging from the downvotes, he comes across a little harsh.
Your README is needlessly abstract. It’s tantamount to saying you’ve invented a new wheel.
Well, wheels have all sorts of specifications, they're made of various materials, can have different weights, etc. They also have all sorts of use cases. From plastic wheels used in toys, rubber wheels used in cars, all the way to various wheels used for the construction of a rocket.
Although conceptually the wheel is an object that allows for easy rotation, you wouldn't use a plastic toy wheel for the construction, say of an automobile, would you? Also, not all wheels are used as rotary devices. Some can be used for just support.
Going back to your network protocol. What does this protocol allow one to do? What can it be used for? Be specific!
PJON is a general purpose "wheel" designed to work on a "charriot" (ATtiny85) as well as on a "formula 1" (real time operative system like linux, winx86, macosx). It has an "all weather tire" able to run on "mud", "tarmac" and "sand" (it operates layer 2 or the data-link agnostically).
Probably for this reason the README seems too general and not specific. The protocol is made NOT to be specific and its implementation is done to be executed (the same codebase) everywhere being 100% software "defined" or "emulated".
"... is an Arduino compatible, multi-master, multi-media network protocol. It proposes a Standard, it is designed as a framework and implements a totally software emulated network protocol stack that can be easily cross-compiled on many architectures like ATtiny, ATmega, ESP8266, ESP32, STM32, Teensy, Raspberry Pi, Linux. It is a valid tool to quickly and comprehensibly build a network of devices". If this is a wall of words that says nothing about what the project is for, we are not from the same universe. And also, I don't think an omitted word in a title that must be short will make all the project an incomprehensible garbage, considering the amount of time and effort has been invested in docs and specs.
I am sorry dozzie, did not want to be aggressive or dry, just I don't get what you mean. PJON works pretty much everywhere. The use you can do of PJON depends on your needs and the architecture that will execute it. In some cases PJON can be useful to "wire a bucket of Arduinos pin-to-pin to each other" but can also be used to create a virtual network computers running winx86, macosx or linux operating over the internet infrastructure. I think you would need some time to go through the available documentation and spec to have a clearer view of its features and limits.
Immediately after the blurb is a section with key properties/selling points, which among other things explains the "multi-media" part. The wording of the description and readme isn't perfect (I suspect the author is not a native english speaker?), but it does contain the details necessary.
Ciao Detaro, thank you for your comment. Could you please point out the incosistencies you have found? I would be happy to fix that, yes I am not a native english speaker sadly :(
But I too was confused by what this PJON thing was supposed to do, until I looked up i2c, because of this line early in the README: "It was originally developed as an open-source alternative to i2c and 1-Wire"
"The Inter-integrated Circuit (I2C) Protocol is a protocol intended to allow multiple “slave” digital integrated circuits (“chips”) to communicate with one or more “master” chips. Like the Serial Peripheral Interface (SPI), it is only intended for short distance communications within a single device. Like Asynchronous Serial Interfaces (such as RS-232 or UARTs), it only requires two signal wires to exchange information."
So it's a very low level, _literal_ wire protocol, I guess. I don't know much about hardware.
I understood what the project is about as soon as I looked at the first para of README. I guess it takes some patience and some topic related knowledge to get the most of READMEs. You can't really expect the software authors to explain everything in a README, like their audience are 12 year olds.
Of course it doesn't need to be audio nor video. It doesn't change the fact
that you used a term that has more than one meaning without providing any
context in which to interpret it. If somebody misreads it, then the problem is
with your prose, not with the reader.
I definitely recommend it for most use cases, if you don't need a very high speed bus.