//https://gregstoll.com/~gregstoll/floattohex/
//https://en.wikipedia.org/wiki/Single-precision_floating-point_format
float Voltage;
unsigned char appData[]={};
void setup() {
Serial.begin(115200);
}
void loop() {
Voltage += 0.01; //12.375; // 35.76; //12.375;
unsigned char *puc;
puc = (unsigned char *)(&Voltage);
//appDataSize = 4;
appData[0] = puc[0];
appData[1] = puc[1];
appData[2] = puc[2];
appData[3] = puc[3];
Serial.print(Voltage);
Serial.print("\t");
Serial.print(appData[0],HEX);
Serial.print("\t");
Serial.print(appData[1],HEX);
Serial.print("\t");
Serial.print(appData[2],HEX);
Serial.print("\t");
Serial.print(appData[3],HEX);
Serial.println();
delay(200);; // this speeds up the simulation
}