//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.99; //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];
appData[3] = puc[4];
appData[3] = puc[5];
appData[3] = puc[6];
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.println(appData[3],HEX);
/*
Serial.print();
Serial.print(appData[4],HEX);
Serial.print();
Serial.print(appData[5],HEX);
Serial.print();
Serial.print(appData[6],HEX);
Serial.println();
*/
delay(200);; // this speeds up the simulation
}