Hallo,
ich habe zusammen mit meinem Arbeitskollegen ein Programm geschrieben was mir digitale Werte von einem A/D Wandler auf mein Raspberry Pi bringen soll, allerdings ist der jetzt im Urlaub und ich habe folgendes Problem...
# include <stdio.h>
# include <stdlib.h>
int main (int argc, char *argv[])
initialisieren
while (0)
{
int max(5);
act = wertholen ();
if (act>max [4])
Wert einordnen (act);
float wertholen ();
{
float wert;
float max;
wert= adwandler holen ();
if (wert>grenze)
{
for (inti = 0; ic 10.000; itt)
{
wert= adwandler holen ();
if (wert>max)
max=wert;
delay (100);
}
return max;
}
voit wert einordnen (float act)
{
if (act>max [0]);
{
max [4]=max [3];
max [3]=max [2];
max [2]=max [1];
max [1]=max [0];
max [0]= act;
}
else if (act>max [1]);
{
max [4]=max [3];
max [3]=max [2];
max [2]=max [1];
max [1]=act;
}
else if (act>max [2]);
{
max [4]=max [3];
max [3]=max [2];
max [2]=act;
}
else if (act>max [3]);
}
max [4] = max [3];
max [3] = act;
}
else if (act>max [4])
{
max [4]=act;
}
}
... allerdings läuft es nicht, der Profiler sagt es liegt am Wort initialisieren:
"Fehler: expected function body after function declarator
initialisieren"
das kommt dann als Fehlermeldung.
Jetzt bin ich ratlos und weiß grad nicht so wirklich weiter und möchte meinen Kollegen nicht in seinem Urlaub stören
Ich hoffe ihr könnt mir schnell helfen.
Gruß