Transmit power CubeCell HTCC-AB01

Can I change the TX_OUTPUT_POWER in the loop like this?

void loop()
{
TX_OUTPUT_POWER = 14;
}

This would be a great idea to conserve battery power if the voltage drop is < 3.3v
Or if the user needs the unit to last longer with less power on one day but another day the user needs the unit to transmit farther.
Thanks

Can you tell us the code you will use?

LORAWAN? or lora p2p?

I do not have any code yet I am just asking if it is possible to change the TX_OUTPUT_POWER in the main loop?

If I was to use this code “https://github.com/HelTecAutomation/ASR650x-Arduino/blob/master/libraries/LoRa/examples/LoRaBasic/LoRaSender/LoRaSender.ino

Could I change the “TX_OUTPUT_POWER” in the main loop based on say a button press? And how do I test if the POWER has been changed?

Thanks Chris

"I do not have any code yet I am just asking if it is possible to change the TX_OUTPUT_POWER in the main loop?"

The reason I asked you before is because Lorawan specifies the maximum output power of each area… If you just use lora p2p, there is no such limitation.

For lorawan, if you use ADR mechanism.You don’t have to worry about power consumption at all. The server will automatically adjust the output power of your node according to the signal strength to achieve low power consumption.Repetitive manufacturing of wheels is not good.

For LORA, You can modify the output power in the loop function. BTW, TX_OUTPUT_POWER is a macro definition. You need to redefine a variable to assign.
%E5%9B%BE%E7%89%87

So in “Loop” I would change the definition “TX_OUTPUT_POWER” to a new number like 14 then I would have to use this code just like in “Setup”
Radio.SetTxConfig( MODEM_LORA, TX_OUTPUT_POWER, 0, LORA_BANDWIDTH, LORA_SPREADING_FACTOR, LORA_CODINGRATE, LORA_PREAMBLE_LENGTH, LORA_FIX_LENGTH_PAYLOAD_ON, true, 0, 0, LORA_IQ_INVERSION_ON, 3000 );
To set the radio to the new output power. Is this correct?

One more question:
What code could I use to confirm that the radio is set to the new output power?

Thanks, Chris

1 Like

You need to use professional equipment: spectrum analyzer. or View RSSI through distance test to indirectly reflect output power.

yes.

Thanks for your help!