February 2019 0 15 Report
Napisałem program w C++ na informatykę i wyskoczył mi ten błąd: a function-definition is not allowed here before '{' token jeżeli moglibyście naprawić ten błąd to dam naj. UWAGA proszę o wyjaśnienie mojego błędu to ważne.


KOD

void setup() {
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(7, INPUT_PULLUP);
pinMode(8, OUTPUT);
} void loop() {

if (digitalRead(7) == LOW) {
void loop() {

digitalWrite(1, LOW);
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
}
}
else {
delay(3000);
digitalWrite(1, LOW);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
delay(1000);

digitalWrite(1, HIGH);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);
delay(4000);
digitalWrite(1, LOW);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
delay(1000);

digitalWrite(1, LOW);
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
delay(1000);
}
}



PS to jest kod na arduino

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.