This file contains hidden or 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
/* https://gist.github.com/ridencww/4e5d10097fee0b0f7f6b | |
* Simple printf for writing to an Arduino serial ports eg. Serial..Serial3. Note: format | |
* specifier must match actual argument type eg. int32 should be formatted as %l, not %d. | |
* Usage: Serial_printf(Serial,"%d\n",vars); | |
* %B binary (d = 0b1000001) %b binary (d = 1000001) %c character (s = H) | |
* %d/%i integer (d = 65) %o boolean on/off (d = On) %% escaped percent ("%") | |
* %f float (f = 123.45) %.3f/%3f float (f = 123.346) %l long (d = 65) | |
* %s char* string (s = xyz) %X hexadecimal (d = 0x41) %x hexadecimal (d = 41) | |
* For more float formats, dtostrf(float_value, min_width, num_digits_after_decimal, where_to_store_string) | |
eg. dtostrf(fpvalue,8,3,fpstr); |