Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. byte A = 0x35;
  2. byte B = 0xC5;
  3. byte C = 0x5A;
  4. byte D = 0x59;
  5.  
  6. unsigned long dec_value = (D << 24) | (C << 16) | (B << 8) | A;
  7.  
  8. char buf[50];
  9. ltoa(dec_value, buf, 10); // 10 is the base value not the size - look up ltoa for avr
  10.  
  11. String my_UID = String(dec_value);
  12.  
  13. Serial.println(my_UID);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement