int i=0;
void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, INPUT);
Serial.begin(9600);
Serial.println("Hola mundo");
}
void loop() {
// put your main code here, to run repeatedly:
for (i=1; i<100; i++)
{
delay(1000);
digitalWrite(12, LOW);
digitalWrite(8, LOW);
if (i%3)
{
if (digitalRead (7==HIGH)
{
Serial.print(i);
Serial.println(" no multiplo");
digitalWrite(8, HIGH);
}
}
else
{
Serial.print(i);
Serial.println(" multiplo de 3");
digitalWrite(12, HIGH);
}
}
}