Skip to content
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
4ib3r4

4ib3r

@4ib3r
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store
About
Posts
6
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Transport based on single wire PJON protocol
    4ib3r4 4ib3r

    I created pull request to main repository 6 days ago but as for now still hangs.

    Development

  • Transport based on single wire PJON protocol
    4ib3r4 4ib3r

    Sory, I forgot commit MySensors.h file, with definitions.
    Definition "MY_PJON" sets transport to PJON.

    /* Simple serial gateway with PJON transport and error handling */
    
    // Enable and select radio type attached
    //#define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    #define MY_PJON //select PJON transport
    #define PJON_PIN 12 //optional to change pin (12 is default)
    
    #define MY_GATEWAY_SERIAL
    
    #include <MySensor.h>  
    void before() {
     //bus object is not initialized in this method
    }
    
    void setup() {
      bus.set_error(error_handler); //direct bus object access
    }
    
    void presentation() {
    }
    
    void loop() { 
    }
    
    void error_handler(uint8_t code, uint8_t data) {
      if(code == CONNECTION_LOST) {
        Serial.print("Connection with device ID ");
        Serial.print(data);
        Serial.println(" is lost.");
      }
      if(code == PACKETS_BUFFER_FULL) {
        Serial.print("Packet buffer is full, has now a length of ");
        Serial.println(data, DEC);
        Serial.println("Possible wrong bus configuration!");
        Serial.println("higher MAX_PACKETS in PJON.h if necessary.");
      }
      if(code == MEMORY_FULL) {
        Serial.println("Packet memory allocation failed. Memory is full.");
      }
      if(code == CONTENT_TOO_LONG) {
        Serial.print("Content is too long, length: ");
        Serial.println(data);
      }
      if(code == ID_ACQUISITION_FAIL) {
        Serial.print("Can't acquire a free id ");
        Serial.println(data);
      }
    }
    

    I created a pull request to PJON with change that allows define the broadcast address because in MySensors is 0xff.

    Development

  • Transport based on single wire PJON protocol
    4ib3r4 4ib3r

    I write new version based on development branch: https://github.com/4ib3r/Arduino
    Unfortunately in this version new transport is integral part of library, but use of this is much easier.
    Now I use synchronous send method with check acknowledge, and loop 500 times with random 100-600us sleep time for ACK, in tests this method is better than async.
    Self PJON library is still required to run this transport and is not included.

    Development

  • Transport based on single wire PJON protocol
    4ib3r4 4ib3r

    @hek Indeed I forgot about the RS485, but PJON don't require additional elements.
    Ok, I try to port this transport to development branch.

    Development

  • Transport based on single wire PJON protocol
    4ib3r4 4ib3r

    @Giovanni-Blu-Mitolo I know, but MySensors has several radio transports, but there is no on the wire.

    Development

  • Transport based on single wire PJON protocol
    4ib3r4 4ib3r

    Hi, I wrote simple transport for MySensors based on PJON protocol (single wire multimaster bus system). Actually this implementation is beta version but in my test enviroment on 3 nodes is working stable.
    https://github.com/4ib3r/MyTransportPJON

    Development
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular