Changing the the Package size from 2 to more in "prepareTxFrame"

Hi ho,

I try to send more then two digits with the prepareTxFrame, but I find no way to do it…
// packet_version and Selftest:
//First Digit is the Type, second the Selftest-Status 0-F
// Battery-Power

int PM1 = 0xFF;
int PM25 = 0x10;
int PM4 = 0x00;
int PM5 = 0xC0;
int PM10 = 0xB0;
uint8_t prepareTxFrame( uint8_t port )
appDataSize = 11; //AppDataSize max value is 64

appData[0] = PACKET_VERSION;    
appData[1] = BATTERYSTATUS;    
appData[2] = Temperature;    
appData[3] = Humidity;    

appData[4] = PM1;
appData[5] = PM25;
appData[6] = PM4;
appData[7] = PM5;
appData[8] = PM10;

appData[9] = Voc;
appData[10] = COtwo;


The output is everytime only the HEX-2digits Code… I am not able to add more. Do you have an idea?
The problem is that my values are bigger then 256 numbers :slight_smile:

best regards


You mean your Voc, CO2 value is greater than 256?

You can refer to this code:

1 Like

Awesome… I will try the payload prepare way.
Thank you for the code !
Added: I am working with the wirelessstick and the wireless stick lite… but i guess it will work too
aspecailly because have added a RGB to the wirelessstick :slight_smile:

Yes right… VOC begins at 400 ( as an example ) and can goes up to over 1000.
The Dust sensoric can messure up to 100.000.

You can refer to this how to upload and decode float data:

1 Like