Updated the definition.h file : added the data structure which is what is sent over the air by the radio module
This commit is contained in:
parent
a86ed2d318
commit
e7325a04a3
@ -8,9 +8,10 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <RF24.h>
|
||||
#include "packet_format.h"
|
||||
|
||||
//Serial debug config part
|
||||
#define SERIAL_DEBUG_ENABLED 0
|
||||
#define SERIAL_DEBUG_ENABLED 1
|
||||
#define SERIAL_BAUD_RATE 115200
|
||||
|
||||
//Battery config part
|
||||
@ -23,6 +24,9 @@
|
||||
#define RADIO_PA_LEVEL RF24_PA_MAX
|
||||
#define RADIO_DATARATE RF24_250KBPS
|
||||
|
||||
//Seep config part
|
||||
#define SLEEP_4_SEC_INTERVAL 1//15
|
||||
|
||||
//Pin config part
|
||||
typedef enum
|
||||
{
|
||||
@ -40,4 +44,18 @@ typedef enum
|
||||
A1_LDR_V_SENS = A1,
|
||||
} Pin;
|
||||
|
||||
//Payload structure
|
||||
typedef struct
|
||||
{
|
||||
uint16_t id;
|
||||
HEADER_e header : 6;
|
||||
unsigned int ldr : 10;
|
||||
float battery;
|
||||
float bmpTemp;
|
||||
float bmpPress;
|
||||
float humidity;
|
||||
float compensatedHumidity;
|
||||
float htuTemp;
|
||||
} DataPacket __attribute__((__packed__));
|
||||
|
||||
#endif //DEFINITION_H
|
||||
|
Loading…
Reference in New Issue
Block a user