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 transmit power

Member Function Documentation

◆ get()

uint8_t get ( )
Description
This api allows the user to get the transmit power
Syntax
api.lorawan.txp.get()
Returns
the LoRaWan transmit power
Example
void setup()
{
    Serial.begin(115200);

    Serial.printf("Set the transmit power %s\r\n", api.lorawan.txp.set(1) ? "Success" : "Fail");
}

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

◆ set()

bool set ( uint8_t  value)
Description
This api allows the user to set the transmit power
Syntax
api.lorawan.txp.set(value)
Parameters
valuethe LoRaWan transmit power
Returns
bool
Return values
TRUEfor setting transmit power successs
FALSEfor setting transmit power failure
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Set the transmit power %s\r\n", api.lorawan.txp.set(1) ? "Success" : "Fail");
  }

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