LowPowerLab Forum

Software support => Coding questions => Topic started by: Creotom on December 09, 2018, 12:45:44 PM

Title: Display Power Level?
Post by: Creotom on December 09, 2018, 12:45:44 PM
Is there a simple way to read what the current TX power level is?
I have the RSSI mapped to a gauge on my screen but I'd like to also show what the current transmit power is.
Hopefully it's something as simple as the code below  ;D
But I just can't seem to find it anywhere.

Code: [Select]
Serial.print(radio.readRSSI())
Title: Re: Display Power Level?
Post by: TomWS on December 09, 2018, 02:09:56 PM
You can't get the transmitted power level in dBm, but, if you're using the RFM69ATC library then you can get the TX power setting:
Code: [Select]
   Serial.print(radio._transmitLevel);
Title: Re: Display Power Level?
Post by: Creotom on December 09, 2018, 02:14:41 PM
Thank you.
That's perfect.

Title: Re: Display Power Level?
Post by: TomWS on December 09, 2018, 02:35:19 PM
With the normal library you could also do a:

Code: [Select]
Serial.print(radio.readReg(REG_PALEVEL ) & 0x1F);
But I don't care for this as it creates unnecessary traffic to the radio.