I need help!


buenas tardes.

necesito ayuda pues que el error que me sale al compilar el programa es este:




c:\users\paula\documents\arduino\sketch_may29d\sketch_may29d.ino: in function 'void loop()':

sketch_may29d:34: error: 'd' not declared in scope

   if (d==0){

       ^

sketch_may29d:36: error: expected ';' before 'd'

     d++;

     ^

sketch_may29d:39: error: 'du' not declared in scope

   if (du==0){

       ^

sketch_may29d:40: error: 'keypad' not declared in scope

     char key = keypad.getkey();

                ^

sketch_may29d:42: error: 'decena' not declared in scope

       decena=key;

       ^

sketch_may29d:48: error: expected primary-expression before '}' token

     }

     ^

c:\users\paula\documents\arduino\sketch_may29d\sketch_may29d.ino:48:5: warning: return-statement value, in function returning 'void' [-fpermissive]

sketch_may29d:48: error: expected ';' before '}' token

sketch_may29d:49: error: 'du' not declared in scope

     if ((du==1)&&(u==0)){

          ^

sketch_may29d:49: error: 'u' not declared in scope

     if ((du==1)&&(u==0)){

                   ^

sketch_may29d:51: error: expected ';' before 'u'

       u++;

       ^

sketch_may29d:53: error: expected primary-expression before '}' token

   }

   ^

c:\users\paula\documents\arduino\sketch_may29d\sketch_may29d.ino:53:3: warning: return-statement value, in function returning 'void' [-fpermissive]

sketch_may29d:53: error: expected ';' before '}' token

sketch_may29d:54: error: 'ud' not declared in scope

   if (ud==0){

       ^

sketch_may29d:55: error: 'keypad' not declared in scope

     char key = keypad.getkey();

                ^

sketch_may29d:57: error: 'unidad' not declared in scope

       unidad=key;

       ^

sketch_may29d:63: error: expected primary-expression before '}' token

     }

     ^

c:\users\paula\documents\arduino\sketch_may29d\sketch_may29d.ino:63:5: warning: return-statement value, in function returning 'void' [-fpermissive]

sketch_may29d:63: error: expected ';' before '}' token

sketch_may29d:64: error: 'maxi' not declared in scope

     if (maxi=0){

         ^

sketch_may29d:65: error: 'maxt' not declared in scope

       maxt=(decena*10)+unidad;

       ^

sketch_may29d:65: error: 'decena' not declared in scope

       maxt=(decena*10)+unidad;

             ^

sketch_may29d:65: error: 'unidad' not declared in scope

       maxt=(decena*10)+unidad;

                        ^

sketch_may29d:78: error: 'u' not declared in scope

 if (u<maxt){

     ^

sketch_may29d:78: error: 'maxt' not declared in scope

 if (u<maxt){

       ^

sketch_may29d:88: error: expected '}' @ end of input

 }

 ^

exit status 1
'd' not declared in scope


y aquí esta el programa

#include <key.h>
#include <keypad.h>
#include <dht.h>
#define dhtpin 2
#define dhttype dht11
dht dht(dhtpin, dhttype);

const byte rows = 4;
const byte colums = 4;
char keys[rows][colums] = {
  { '1','2','3', 'a' },
  { '4','5','6', 'b' },
  { '7','8','9', 'c' },
  { '#','0','*', 'd' }
};
const byte rowpins[rows] = { 11, 10, 9, 8 };
const byte colpins[colums] = { 7, 6, 5, 4 };
int unidad=0;
int decena=0;
int u=0;
int d=0;
int du=0;
int ud=0;
int maxi=0;
int maxt=0;

void setup() {

serial.begin(9600);
dht.begin();

}
void loop() {
  if (d==0){
    serial.println("ingrese una decena")
    d++;
    return;
  }
  if (du==0){
    char key = keypad.getkey();
    if (key){
      decena=key;
      decena=decena-48;
      serial.println (decena);
      du++;
    }
    return
    }
    if ((du==1)&&(u==0)){
      serial.println("ingrese una unidad")
      u++;
      return
  }
  if (ud==0){
    char key = keypad.getkey();
    if (key){
      unidad=key;
      unidad=unidad-48;
      serial.println (unidad);
      ud++;
    }
    return
    }
    if (maxi=0){
      maxt=(decena*10)+unidad;
      serial.println ("la temperatura maxima estupulada es");
      serial.println (maxt);
      maxi++;
    }
delay(3000);

float h = dht.readhumidity();
float t = dht.readtemperature();
if (isnan(h) || isnan(t)) {
serial.println("error");
return;
}
if (u<maxt){
float hic = dht.computeheatindex(t, h, false);
serial.print("humedad: ");
serial.print(h);
serial.print(" %\t");
serial.print("temperatura: ");
serial.print(t);
serial.print(" *c ");
serial.print(hic);
serial.print(" *c ");
}

serial.println("ingrese una decena")

serial.println("ingrese una decena");

leo..


Arduino Forum > International > Español (Moderators: surbyte, Hector_A) > I need help!


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts