The physical layer configuration is handled by the Strategy entity, if you want to communicate bi-directionally on a single medium (using SoftwareBitBang, OverSampling or AnalogSampling), sharing transmission and reception line, use:
PJON<SoftwareBitBang> bus; bus.strategy.set_pin(12);
With this setup it is possible to communicate in
PJON_HALF_DUPLEX with up to 254 different devices on the same wire.
If for some reason you need to keep separate the two lines, for example if using cheap radio transmitter and receiver modules, to which you have to connect two wires:
PJON<OverSampling> bus; bus.strategy.set_pins(11, 12);
If you don't need bidirectional communication and you have only the transmitter on one side and the receiver on the other side you can use the
PJON<OverSampling> bus; // Operate in simplex mode bus.strategy.set_communication_mode(PJON_SIMPLEX); // Use only receiver pin bus.strategy.set_pins(11, PJON_NOT_ASSIGNED);
See the readme of the strategy you are using to have additional information on its dedicated physical layer configuration.
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