RUI3 (RAK Unified Interface 3) - RAK4631

Public Member Functions

uint8_t get ()
 
bool set (uint8_t value)
 

Detailed Description

Description
This api allows the user to access the data rate

Member Function Documentation

◆ get()

uint8_t get ( )
Description
This api allows the user to get the data rate
Syntax
api.lorawan.dr.get()
Returns
the data rate
Example
void setup()
{
    Serial.begin(115200);

    Serial.printf("Set the data rate  %s\r\n", api.lorawan.dr.set(5) ? "Success" : "Fail");
}

void loop()
{
    Serial.printf("The data rate is %d\r\n", api.lorawan.dr.get());
    delay(1000);
}

◆ set()

bool set ( uint8_t  value)
Description
This api allows the user to set the data rate
Syntax
api.lorawan.dr.set(value)
Parameters
valuethe data rate
Returns
bool
Return values
TRUEfor setting data rate success
FALSEfor setting date rate failure
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Set the data rate  %s\r\n", api.lorawan.dr.set(5) ? "Success" : "Fail");
  }

  void loop()
  {
      Serial.printf("The data rate is %d\r\n", api.lorawan.dr.get());
      delay(1000);
  }