PJON implements a totally software emulated network protocol stack in around 1500 lines of code, thanks to the strategies abstraction it can work nominally with any data link is in use and can be applied in a variety of media and applications. This library can be cross-compiled (-std=c++11) to work with any Arduino compatible device, linux or windows x86 machine.

Thanks to the interfaces abstraction, PJON can be easily ported on any MCU/architecture exposing random generation, timing and IO system calls (for example on Arduino: random, micros, pinMode).

  Implementation model
      | Layer 3 Network                                   |
      | PJON                                              |
   ___| send, send_packet, send_repeatedly ...            |
  |   |___________________________________________________|
  |   | Layer 2 data link or strategy                     |
  |   | AnalogSampling, OverSampling, SoftwareBitBang ... |
  --->| can_start, send_string, receive_byte ...          |___
      |___________________________________________________|   |
      | Interfaces to system calls                        |   |
   ___| PJON_MICROS, PJON_RANDOM, PJON_IO_MODE ...        |<---
  |   |___________________________________________________|
  |   | Layer 1 physical-layer                            |
  |   | System calls:                                     |
  --->| micros, random, delayMicroseconds ...             |

This library exposes to users a set of methods to easily configure and handle communication between devices:

This document is automatically generated from the github repository. If you have noticed an error or an inconsistency, please report it opening an issue here

Compatible devices


PJON - ATtiny85 compatible


PJON - ATtiny84/84A compatible

Arduino Uno

PJON - Arduino uno compatible

Arduino Leonardo

PJON - Arduino Leonardo compatible

Arduino Mega

PJON - Arduino Mega compatible

Arduino Nano

PJON - Arduino Nano compatible

Arduino Micro

PJON - Arduino Micro compatible

Arduino Esplora

PJON - Arduino Esplora compatible


PJON - Teensy compatible

Arduino Due

PJON - Arduino Due compatible

Bluepill STM32

PJON - Bluepill STM32F103 compatible


PJON - ESP8266 compatible

Node MCU

PJON - NodeMCU compatible


PJON - ESP32 compatible

Raspberry Pi

PJON - Raspberry Pi compatible


PJON - LINUX compatible


PJON - WINX86 compatible

Mac OS X

PJON - Apple MACOSX compatible

Strategies abstraction

PJON codebase uses strategies to physically communicate through the medium used, abstracting the data link layer from its procedure. A Strategy is a class containing the back-off configuration and a set of methods able to send and receive messages; 7 strategies are available to communicate data through various media. Take a look at the strategies video introduction for a brief showcase of their features.