// data type ทำให้มีรูปแบบข้อมูลแบบใหม่
union float_t { 
  float f;
  byte b[sizeof(float)];
};
// Naming a union ทำให้ใช้งาน data.i ได้
union {
  uint32_t i;
  float f;
} data;
// ทำงานเมื่อเริ่มต้น
void setup() {
  Serial.begin(115200);
  float_t cf = {500.0};
  // float to hex
  char myhex[9];
  sprintf(myhex, "0x%02x%02x%02x%02x", cf.b[3], cf.b[2], cf.b[1], cf.b[0]);
  Serial.println(myhex);
  // hex to float
  const char hex[] = "43FA0000";
  data.i = strtoul(hex, NULL, 16);
  Serial.println(data.f, 2);
}
// ทำงานซ้ำ
void loop() { }