Changed transmit power from PA_MIN to PA_LOW, minor changes in the app code and added some comments
This commit is contained in:
parent
23cb95fd41
commit
9362002b33
@ -17,7 +17,7 @@ void setup()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
rCode = WSP.init();
|
rCode = WSP.init();
|
||||||
memset(&payload, 0, sizeof(payload));
|
memset(&payload, 0, sizeof payload);
|
||||||
#if SERIAL_DEBUG_ENABLED == 1
|
#if SERIAL_DEBUG_ENABLED == 1
|
||||||
Serial.print("Payload size : ");Serial.println(sizeof payload);
|
Serial.print("Payload size : ");Serial.println(sizeof payload);
|
||||||
debugStruct(&payload);
|
debugStruct(&payload);
|
||||||
@ -57,10 +57,10 @@ void loop()
|
|||||||
if(WSP.getRadio().isChipConnected())
|
if(WSP.getRadio().isChipConnected())
|
||||||
{
|
{
|
||||||
WSP.applyRadioConfig();
|
WSP.applyRadioConfig();
|
||||||
|
//WSP.getRadio().setPayloadSize(sizeof payload); //Does not work
|
||||||
WSP.getRadio().setRetries(10,20);
|
WSP.getRadio().setRetries(10,20);
|
||||||
WSP.getRadio().openWritingPipe((const uint8_t *)RADIO_NODE_ADDRESS);
|
WSP.getRadio().openWritingPipe((const uint8_t *)RADIO_NODE_ADDRESS);
|
||||||
//WSP.getRadio().setPayloadSize(sizeof payload);
|
bool result = WSP.getRadio().write(&payload, sizeof payload);
|
||||||
bool result = WSP.getRadio().write(&payload, sizeof(payload));
|
|
||||||
#if SERIAL_DEBUG_ENABLED == 1
|
#if SERIAL_DEBUG_ENABLED == 1
|
||||||
if(result)
|
if(result)
|
||||||
Serial.println("Payload sent !");
|
Serial.println("Payload sent !");
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
//NRF Radio config part
|
//NRF Radio config part
|
||||||
#define RADIO_CHANNEL 108
|
#define RADIO_CHANNEL 108
|
||||||
#define RADIO_NODE_ADDRESS "WEST1" //Weather Station 1
|
#define RADIO_NODE_ADDRESS "WEST1" //Weather Station 1
|
||||||
#define RADIO_PA_LEVEL RF24_PA_LOW
|
#define RADIO_PA_LEVEL RF24_PA_LOW //RF24_PA_MIN,RF24_PA_LOW,RF24_PA_HIGH,RF24_PA_MAX
|
||||||
#define RADIO_DATARATE RF24_250KBPS
|
#define RADIO_DATARATE RF24_250KBPS
|
||||||
|
|
||||||
//Sleep config part : in 4 second increments ie : 1 corresponds to 4s of sleep, and 15 correponds to 60 seconds of sleep.
|
//Sleep config part : in 4 second increments ie : 1 corresponds to 4s of sleep, and 15 correponds to 60 seconds of sleep.
|
||||||
|
Loading…
Reference in New Issue
Block a user