Using readVcc() on esplora+TFT

I want to take this result and convert it into a Char Array

here is code:

long readVcc() {
long result;
// Read 1.1V reference against AVcc
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Convert
while (bit_is_set(ADCSRA,ADSC));
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate AVcc in mV
return result;
}

void setup() {
Serial.begin(9600);
}

void loop() {
Serial.println( readVcc(), DEC );
delay(1000);
}

How should I do that :relaxed: :relaxed: :relaxed:

I want to take this result and convert it into a Char Array

The value returned by readVcc()? Why?

The sprintf() function is one way. itoa() is another.

I want to convert it to that so I can display text on a TFT by using: EsploraTFT.text();

You know, after 28 posts you'd think you'd take the time to read the posts at the top of this Forum and follow the rules for posting here. It would not only make things easier for us, you'd get more people willing to help you.

You could also considering reading ALL of the replies you do get. You've gotten the answers you need. YOU need to do some research about how to use the functions.

Sorry I'm kinda new and using esplora now I'm trying it with uno