Created
August 18, 2017 07:22
-
-
Save urmil0071/554ba3d7f440449da9e6cd0bc651eec9 to your computer and use it in GitHub Desktop.
Write C Codes to generate binary32 formatted data for a float (x=11.567)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
void setup() | |
{ | |
union | |
{ | |
uint32_t B32; | |
float Float; | |
} | |
floatb32; | |
Serial.begin(9600); | |
floatb32.Float=11.567; | |
Serial.println(floatb32.B32,HEX); | |
} | |
void loop() | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment