This code:
int Kounter = 0;
void setup() {
Serial.begin(9600);
while (!Serial) {
}
Serial.println("start setup");
Kounter = 0;
Serial.print("KounterA = ");
Serial.println(Kounter);
Serial.println("end setup");
}
void loop() {
Kounter = 0;
delay(5000);
Serial.print("KounterB = ");
Serial.println(Kounter);
if (Kounter = 1){
Serial.print("KounterC = ");
Serial.println(Kounter);
}
}
Does this:
start setup
KounterA = 0
end setup
KounterB = 0
KounterC = 1
KounterB = 0
KounterC = 1
What's wrong with this picture?