Receiving Data - g7kse/CanSat GitHub Wiki

This section gives the basic run down on the hardware configuration and some basic software to get started. The received data will be in the form of a data frame that can be passed into Serial Studio and consists of

Data Unit Note
Temperature Deg C Primary mission data - taken from the BMP280
Pressure hPa Primary mission data - taken from the BMP280
Mission Time s Time from 'Power On' in seconds
Altitude m Inferred from the pressure difference at the time of launch
Signal Strength % A clunky calculation from RSSI

Hardware

The breadboard hardware is as below with the data pin allocations. Just as the transmitter the RFM9x is 5v tolerant so the Vin and GND pins can be interfaced with the VBus and any GND pin.

Board Pin
SCL GPIO Pin 2
MISO GPIO Pin 3
MOSI GPIO Pin 4
CS GPIO Pin 6
RST GPIO Pin 7

20211211_134307

Software

The receive code example is available in the repo and an explanation of the makeup of the code is within the comments. The premise is to receive the Payload sting and to append a /* at the front add in a crude signal strength calculation based on RSSI (just to give us a positive number with which to work with on the dashboard) and then to close the frame with a */

The result is a data frame that looks a bit like this

/*CanSat example,mission time,temperature,pressure,altitude,signal strength*/