No suitable conversion function from "StringSumHelper" to "char" exists

Hi, I'm working in a school proyect in VS Code and the IDE gives me this error "no suitable conversion function from "StringSumHelper" to "char" exists".

char tiempotranscurrido(int minutos){
    int horas = int((minutos / 60));
    int min = minutos - (horas * 60);
    char tiempo = String(horas) + "h " + String(minutos) + "m ";
    return tiempo;
}

The objective of this function is to convert minutes to hours and minutes, turn it into a string and pass it back to be used wherever I need to.
When I try to convert an int or float variable into a string in a Serial.println it works, but here it doesn't. Here is what I mean:

tiempodeCargaMinutos = (millis() - tiempocarga)/60000;
Serial.println("Tiempo de carga: " + String(int((tiempodeCargaMinutos/60))) + "h " + String(tiempodeCargaMinutos - (int((tiempodeCargaMinutos/60)) * 60)) + "m");

Im sure I'm missing something, I'm just starting. Sorry for the broken english :frowning:

A char holds a single byte

Thanks for answering.
How should I fix it? I understand what is a byte but I don't know how should I store it.
Is there a string variable? like

string tiempo = String(horas) + "h " + String(minutos) + "m ";

How about String?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.