I'm currently trying to concatenate 3 integers to a space deliminated string. However, I can't seem to get the correct syntax. Am I missing a certain function that will help me put the string together? Below is the code I'm trying to use that should perform the function.
I'm currently getting the error:
test.ino: In function 'void conv_display_f(unsigned char*, float*)': test:50: error: invalid conversion from 'unsigned char*' to 'char*' test:50: error: initializing argument 1 of 'int snprintf(char*, size_t, const char*, ...)'
float flon = 11.11;
unsigned char lon_digits[10];
void setup()
{
Serial.begin(9600);
Serial.println();
}
void loop()
{
conv_display_f(lon_digits, &flon);
void conv_display_f(unsigned char *loca, float *cord)
{
int deg, minute, seconds;
char degC[3], minC[2], secC[3];
float temp = cord[0];
deg = floor(temp);
minute = floor((temp-deg)*60);
seconds = (((temp-deg)*60)-minute)*60;
snprintf(lon_digits, sizeof(lon_digits), "%d %d %d", deg, minute, seconds);
}