Skip to content

M17-Project/SX1255_HAT-hw

Repository files navigation

CC BY-NC-SA 4.0

SX1255_HAT-hw

Raspberry Pi Zero shield with the SX1255 RF transceiver chip.

Board preview

Usage

RPi sample config code

Sample Raspberry Pi code for SX1255 control can be found here.
I2S slave overlay is required. Sample rate for both RX and TX is 125kHz.

RX/TX frequency setting:

./sx1255-spi 435000000 438000000

Example RX with ZeroMQ

arecord -t raw -f S32_LE -r 192000 -c 2 --device="hw:0,1" | ./int_to_short | ./zmq-pub

In which int_to_short is a simple int to short format converter:

while(1)
{
  ioctl(STDIN_FILENO, FIONREAD, &rcvd);
  if(rcvd>0)
  {
    if(read(STDIN_FILENO, inp, rcvd)==rcvd)
    {
      for(int i=0; i<rcvd; i+=8)
      {
        memcpy(&out[i/2  ], &inp[i  +2], 2);
        memcpy(&out[i/2+2], &inp[i+4+2], 2);
      }

      write(STDOUT_FILENO, out, rcvd/2);
    }
  }
}

Example TX with ZeroMQ

./zmq-sub 192.168.50.243:17018 | aplay -t raw -f S32_LE -r 192000 -c 2 --device="hw:0,0"

Example GNU Radio flowgraphs

There are 2 demo flowgraphs available:

The RX demo also provides a set of sinc compensating FIR filter taps through the Decimating FIR Filter block.

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

About

Raspberry Pi Zero shield with the SX1255 RF transceiver chip

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published