alguien me puede ayudar a ver los errores en este código de Arduino
void setup() {
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
pinMode(5, OUTPUT);
pinMode(4, OUTPUT);
pinMode(3, OUTPUT);
pinMode(2, OUTPUT);
}
void loop() {
float lectura = analogRead(0);
float tempertura = ( lectura * (500.0 / 1023 )) -50.0;
}
if (temperatura < 10 ) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, LOW);
DigitalWrite(10, LOW);
DigitalWrite(9, LOW);
DigitalWrite(8, LOW);
DigitalWrite(7, LOW);
DigitalWrite(6, LOW);
DigitalWrite(5, LOW);
DigitalWrite(4, LOW);
DigitalWrite(3, LOW);
DigitalWrite(2, LOW);
}
if (temperatura > 10 &&temperatura <12) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, LOW);
DigitalWrite(10, LOW);
DigitalWrite(9, LOW);
DigitalWrite(8, LOW);
DigitalWrite(7, LOW);
DigitalWrite(6, LOW);
DigitalWrite(5, LOW);
DigitalWrite(4, LOW);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
if (temperatura > 12 &&temperatura <14) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, LOW);
DigitalWrite(10, LOW);
DigitalWrite(9, LOW);
DigitalWrite(8, LOW);
DigitalWrite(7, LOW);
DigitalWrite(6, LOW);
DigitalWrite(5, LOW);
DigitalWrite(4, HIGH);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
if (temperatura > 14 &&temperatura <16) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, LOW);
DigitalWrite(10, LOW);
DigitalWrite(9, LOW);
DigitalWrite(8, LOW);
DigitalWrite(7, LOW);
DigitalWrite(6, LOW);
DigitalWrite(5, HIGH);
DigitalWrite(4, HIGH);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
if (temperatura > 16 &&temperatura <18) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, LOW);
DigitalWrite(10, LOW);
DigitalWrite(9, LOW);
DigitalWrite(8, LOW);
DigitalWrite(7, LOW);
DigitalWrite(6, HIGH);
DigitalWrite(5, HIGH);
DigitalWrite(4, LOW);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
if (temperatura > 18 &&temperatura <20) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, LOW);
DigitalWrite(10, LOW);
DigitalWrite(9, LOW);
DigitalWrite(8, LOW);
DigitalWrite(7, HIGH);
DigitalWrite(6, HIGH);
DigitalWrite(5, HIGH);
DigitalWrite(4, HIGH);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
if (temperatura > 20 &&temperatura <22) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, LOW);
DigitalWrite(10, LOW);
DigitalWrite(9, LOW);
DigitalWrite(8, HIGH);
DigitalWrite(7, HIGH);
DigitalWrite(6, HIGH);
DigitalWrite(5, HIGH);
DigitalWrite(4, HIGH);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
if (temperatura > 22 &&temperatura <24) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, LOW);
DigitalWrite(10, LOW);
DigitalWrite(9, HIGH);
DigitalWrite(8, HIGH);
DigitalWrite(7, HIGH);
DigitalWrite(6, HIGH);
DigitalWrite(5, HIGH);
DigitalWrite(4, HIGH);
DigitalWrite(3, HIGH);
}
if (temperatura > 24 &&temperatura <26) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, LOW);
DigitalWrite(10, HIGH);
DigitalWrite(9, HIGH);
DigitalWrite(8, HIGH);
DigitalWrite(7, HIGH);
DigitalWrite(6, HIGH);
DigitalWrite(5, HIGH);
DigitalWrite(4, HIGH);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
if (temperatura > 26 &&temperatura <28) {
DigitalWrite(13, LOW);
DigitalWrite(12, LOW);
DigitalWrite(11, HIGH);
DigitalWrite(10, HIGH);
DigitalWrite(9, HIGH);
DigitalWrite(8, HIGH);
DigitalWrite(7, HIGH);
DigitalWrite(6, HIGH);
DigitalWrite(5, HIGH);
DigitalWrite(4, HIGH);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
if (temperatura > 28 &&temperatura <30) {
DigitalWrite(13, LOW);
DigitalWrite(12, HIGH);
DigitalWrite(11, HIGH);
DigitalWrite(10, HIGH);
DigitalWrite(9, HIGH);
DigitalWrite(8, HIGH);
DigitalWrite(7, HIGH);
DigitalWrite(6, HIGH);
DigitalWrite(5, HIGH);
DigitalWrite(4, HIGH);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
if (temperatura > 30 &&temperatura <32) {
DigitalWrite(13, HIGH);
DigitalWrite(12, HIGH);
DigitalWrite(11, HIGH);
DigitalWrite(10, HIGH);
DigitalWrite(9, HIGH);
DigitalWrite(8, HIGH);
DigitalWrite(7, HIGH);
DigitalWrite(6, HIGH);
DigitalWrite(5, HIGH);
DigitalWrite(4, HIGH);
DigitalWrite(3, HIGH);
DigitalWrite(2, LOW);
}
}
Respuestas a la pregunta
Contestado por
0
Respuesta:
1r11411¹1144111¹12q@@1_&@12²2122241&5¹1(!1
Explicación:
1
q11
223swqt2¹34y52²2312q2241qtqt4
Adjuntos:
Otras preguntas
Ciencias Sociales,
hace 29 días
Matemáticas,
hace 29 días
Baldor,
hace 1 mes
Física,
hace 8 meses
Francés,
hace 8 meses