exit status 1 'form' was not declared in this scope

typedef struct _Temperaturen {
String SysTemperature ; // temperature on the RTC
String motortemperature ; // One-wire temperature sensor motor
String outsidetemperature ;
} Temperatures ;
Temperatures t_data ;

String StrLeistung ; // overall performance

float genbat ;
String generatorbattery ;
int timeout = 0 ;
// Declaration for the breaks
unsigned long previousMillis = 0 ;

typedef struct Powermeter_ {
float L1_voltage = 0 ;
float L2_voltage = 0 ;
float L3_voltage = 0 ;
float L1_current = 0 ;
float L2_current = 0 ;
float L3_Strom = 0 ;
float L1_Power = 0 ;
float L2_Performance = 0 ;
float L3_Performance = 0 ;

} Powermeter ;
Powermeter p_data ;

void MQTTconnect () {
Serial . print ( "Connecting to MQTT ..." );
while ( ! MQTT . connect ( "ats" , MQTTUsername , MQTTPassword )) {
Serial . print ( "." );
delay ( 1000 );
}
Serial . println ( " \ n Connected!" );
MQTT . subscribe ( String ( MQTTTopic ) + "/ set / #" );
}

void LCD_Start () {
byte showDate;
byte showTime;
String LCDHead ();
lcd . setCursor ( 0 , 1 );
delay ( 2 );
lcd . print ( showDate );
lcd . print ( "" );
lcd . print ( showTime );

}

void LCD_Verbrauch () {
String str() ;
String LCDHead ();
lcd . setCursor ( 0 , 1 );
delay ( 2 );
str = Form(String(p_data.L1_voltage, 0) + "V", 6);
str + = Form ( String ( p_data . L3_Voltage , 0 ) + "V" , 6 );
lcd . print ( fillup ( str ));

lcd . setCursor ( 0 , 2 );
delay ( 2 );
str = Form ( String ( p_data . L1_Strom , 1 ) + "A" , 6 );
str + = Form ( String ( p_data . L2_Strom , 1 ) + "A" , 6 );
str + = Form ( String ( p_data . L3_Strom , 1 ) + "A" , 6 );
lcd . print ( fillup ( str ));

lcd . setCursor ( 0 , 3 );
delay ( 2 );
if ( p_data . L1_Leistung > 1000 ) {
p_data . L1_Performance = p_data . L1_Power / 1000 ;
str = Form ( String ( p_data . L1_Leistung , 1 ) + "KW" , 6 );
} else {
str = Form ( String ( p_data . L1_Power , 0 ) + "W" , 6 );
}
if ( p_data . L2_Leistung > 1000 ) {
p_data . L2_Performance = p_data . L2_Performance / 1000 ;
str + = Form ( String ( p_data . L2_Leistung , 1 ) + "KW" , 6 );
} else {
str + = Form ( String ( p_data . L2_Performance , 0 ) + "W" , 6 );
}
if ( p_data . L3_Leistung > 1000 ) {
p_data . L3_Performance = p_data . L3_Performance / 1000 ;
str + = Form ( String ( p_data . L3_Leistung , 1 ) + "KW" , 6 );
} else {
str + = Form ( String ( p_data . L3_Performance , 0 ) + "W" , 6 );
}
lcd . print ( fillup ( str ));
}

void LCD_Leistungen () {
long form();

String str ;
Performance = p_data . L1_Power + p_data . L2_performance + p_data . L3_Performance ;
String LCDHead ();

lcd . setCursor ( 0 , 1 );
delay ( 2 );
str = "achievement:" ;
str + = Form ( String (power, 0 ) + "W" , 8 );
lcd . print ( fillup ( str ));

lcd . setCursor ( 0 , 2 );
delay ( 2 );
str = "battery:" ;
str + = Form ( ConvSeperator ( GeneratorBatterie ) + "V" , 8 );
lcd . print ( fillup ( str ));

lcd . setCursor ( 0 , 3 );
delay ( 2 );
str = "" ;
lcd . print ( fillup ( str ));
}

void LCD_Temperaturen () {
String str ;
String LCDHead ();
form();
String float= Form(t_data.MotorTemperatur)
lcd . setCursor ( 0 , 1 );
delay ( 2 );
str = "Motor:" ;
str += Form(t_data.MotorTemperatur + " " + (char)dg + "C", 8);
lcd . print ( fillup ( str ));

lcd . setCursor ( 0 , 2 );
delay ( 2 );
str = "outside:" ;
str + = Form ( t_data . Outside temperature + "" + ( char ) dg + "C" , 8 );
lcd . print ( fillup ( str ));

lcd . setCursor ( 0 , 3 );
delay ( 2 );
str = "System:" ;
System = Form ( t_data . SysTemperature + "" + ( char ) dg + "C" , 8 );
lcd . print ( fillup ( str ));
}

where is the form() sub-function? you invoke it in LCD_Temperature()

1 Like

The compiler seems to be correct 'form' is not defined anywhere. And neither is 'Form' which is different or 'lcd' or plenty of other things.

But since that isn't a complete program I guess they might be defined in the parts you haven't posted.

Steve

We should not waste our time on this topic. The OP couldn't be bothered to give themselves a proper user name, just mashed the keyboard, not one sentence explaining the problem or asking for help, just slapped (some of) their code into the post without code tags. They show zero respect for the forum and deserve the none from us.

1 Like

sorry/// my frinde

thank you

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