• Do you have any docs on your AzzyRF protocol (maybe Espruino code to transmit?). I'm actually planning on doing some demos with something on 433Mhz (using a PC to decode, and an Espruino to encode) and it'd be nice to publish the JS for that.

    From the code I can find it looks like:

    • 30x 0.2ms on, 0.2ms off training pulse
    • 2ms delay (while off)
    • Transmit bits MSB first, on for 0.55ms for 1, 0.3ms for 0, then off for 0.42ms
    • Delay 2ms before a repeat

    packet format is (lifted from your code):

    The first byte of packets is:
    | SZ1 | SZ0 | A5 | A4 | A3 | A2 | A1 | A0 |
    A5~0: Address bits - 6 bit address of the device, compared to MyAddress. Only packets matching address are processed.
    SZ1~SZ0: Size setting
    SZ1=0, SZ0=0: 4 bytes
    SZ1=0, SZ0=1: 8 bytes
    SZ1=1, SZ0=0: 16 bytes
    SZ1=1, SZ0=1: 32 bytes
    The next two bytes go into MyCmd and MyParam, respectively, if the transmission is accepted (ie, device address matches and checksum is OK)
    In a 4 byte packet, the first 4 bits of the last byte goes into MyExtParam (extended parameter), and the last 4 bits are the checksum.
    For all longer packets, the whole fourth byte goes into MyExtParam, and the final byte is the checksum.
    For 4 byte packets, checksum is calculated by XORing the first three bytes, then XORing the first 4 bits of the result with the last 4 bits, and the first 4 bits of the fourth byte.
    For longer packets, checksum is calculated by XORing all bytes of the packet.
    
About

Avatar for Gordon @Gordon started