PU2CLR SI470X Arduino Library 1.0.1
Arduino Library for Si470X Devices - By Ricardo Lima Caratti
|
Functions | |
int | SI470X::checkI2C (uint8_t *addressArray) |
Check the I2C bus address. | |
void | SI470X::convertToChar (uint16_t value, char *strValue, uint8_t len, uint8_t dot, uint8_t separator, bool remove_leading_zeros=true) |
Converts a number to a char array. | |
int SI470X::checkI2C | ( | uint8_t * | addressArray | ) |
Check the I2C bus address.
For some reason, the BK1088 device does not work with the standard Wire.h library of Arduino.
The checkI2C function is only used to test the circuit.
In practice, no function from the Wire.h library is utilized in a real application with the BK1088 in this project.
uint8_t | address Array - this array will be populated with the I2C bus addresses found (minimum three elements) |
void SI470X::convertToChar | ( | uint16_t | value, |
char * | strValue, | ||
uint8_t | len, | ||
uint8_t | dot, | ||
uint8_t | separator, | ||
bool | remove_leading_zeros = true |
||
) |
Converts a number to a char array.
It is useful to mitigate memory space used by functions like sprintf or othetr generic similar functions
You can use it to format frequency using decimal or tousand separator and also to convert smalm numbers.
value | value to be converted |
strValue | char array that will be receive the converted value |
len | final string size (in bytes) |
dot | the decimal or tousand separator position |
separator | symbol "." or "," |
remove_leading_zeros | if true removes up to two leading zeros (default is true) |