Can someone tell me why Serial.print always send an one and dont count???

void setup() {
pinMode(behaelter1_rum, OUTPUT); // Festlegen der Pins als In - oder Output
pinMode(behaelter2_wodka, OUTPUT);
pinMode(behaelter3_tequila, OUTPUT);
pinMode(behaelter4_whiskey, OUTPUT);
pinMode(behaelter5_pfirsichlikoer, OUTPUT);
pinMode(behaelter6_batida, OUTPUT);
pinMode(behaelter7_osaft, OUTPUT);
pinMode(behaelter8_anasaft, OUTPUT);
pinMode(behaelter9_cransaft, OUTPUT);
pinMode(behaelter10_grenasaft, OUTPUT);
pinMode(behaelter11_marasaft, OUTPUT);
pinMode(behaelter12_cocossirup, OUTPUT);
pinMode(behaelter13_grenasirup, OUTPUT);
pinMode(behaelter14_cola, OUTPUT);
pinMode(behaelter15_milch, OUTPUT);
pinMode(ok, OUTPUT);
Serial.begin(9600);

}
void gewicht()
{
gewicht_out = analogRead(gewicht_in);
}
void loop() {
int i = 0;
int sicherheit = 1;
int auswahl = 1;

int glas = 1;
int druck = 1;
int tuer = 1;

Serial.println(gewicht_out);
delay(1000);
//Serial.println(sicherheit); // Ausgabe Analogwert
//delay(500); // Wartezeit

if(tuer >= 0 && druck >= 0 && glas >= 0)
sicherheit = 1;
digitalWrite(ok, HIGH);
Serial.println(“gewicht_out”); // Ausgabe Analogwert
delay(4000);

if(auswahl == 1 && sicherheit == 1)
{
if(screwdriver > 0)

  • {*
  • do*
  • {*
    _ digitalWrite(ventile*,HIGH);_
    _
    Serial.println(“pimmel”);_
    _
    delay(500);_
    }while(gewicht_out <= screwdriver);*

_ digitalWrite(ventile*,LOW);
delay(1000);
++i;
Serial.println(i);
delay(1000);
}
else*

* {
++i;
Serial.println(i);
delay(3000);
}
}
if(i == 15)
{
i = 0;
auswahl = 0;
screwdriver[0] = ‘/0’;
}
}*_

You haven't even declared a variable called gewicht_out, so you can't assign a value to it or print it.

Does your code REALLY look like that?

Please use code tags.

Read this before posting a programming question

  1. Use code tags.
  2. Post ALL your code.
  3. In code tags.
  4. C escapes use a backslash () not a forward slash (/)