Advertisement
RuiViana

float_to_array.ino

Sep 29th, 2018
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. float fval = 1.475;
  2. byte* array = (byte*) &fval;
  3.  
  4. void setup ()
  5. {
  6.  Serial.begin (9600);
  7.  for (int i = 0; i < 4; ++i) {
  8.    Serial.println (array [i], HEX);
  9.  }
  10. }
  11.  
  12. void loop ()
  13. {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement