int x = 4; //VARIABLE GLOBAL
void setup() {
// put your setup code here, to run once:
int x = 3; //VARIABLE LOCAL
Serial.begin(9600);
Serial.print("\n");
Serial.print("Estas en el void setup, y x=");
Serial.println(x);//3
delay(1000);
}
void loop() {
Serial.print("Estás en el void loop, y x=");
Serial.print(x);//4
Serial.print("\n");
//hello();
setup();
delay(1000);
//Cando X=7 --> x=4
//Si non chega a 7 que siga x++;
if(x == 7)
x = 4;
else
hello();
}
void hello() {
Serial.print("La función hello tiene x=");
Serial.println(x);
x = x + 1;//iNCREMENTO DE 1 NO VALOR DE X
}