# data[].attributes.body
int button = 2;
void setup()
{
pinMode(button,INPUT_PULLUP);
}
void loop()
{
if (digitalRead(button) == LOW)
{
instructions
}
else
{
instructions
}
}

# data[].attributes.body
int led;
int pot;
int value_pot;
void setup()
{
led = 3;
pot = A4;
value_pot = 5;
pinMode(led,OUTPUT);
pinMode(pot,INPUT);
Serial.begin(9300);
}
void loop()
{
digitalWrite(led,HIGH);
value_pot = analogRead(pot);
Serial.println(value_pot);
delay(value_pot);
digitalWrite(led,LOW);
delay(value_pot);
}

# data[].attributes.body
int leda = 4;  //led amarillo
int button = 2;
void setup()
{
pinMode(button,INPUT_PULLUP);
pinMode(leda, OUTPUT);
}
void loop()
{
if (digitalRead(button) == LOW)
{
digitalWrite(leda, HIGH);
delay(1000);
}
else
{
digitalWrite(leda, LOW);
}
}

# data[].attributes.body
int ledred = 10;
int ledblue = 11;
int ledgreen = 12;

void setup()
{
pinMode(ledred, OUTPUT);
pinMode(ledblue, OUTPUT);
pinMode(ledgreen, OUTPUT);
}

void loop()
{
digitalWrite(ledred,255);
digitalWrite(ledblue,0);
digitalWrite(ledgreen,0);
delay(1000);
digitalWrite(ledred,0);
digitalWrite(ledblue,255);
digitalWrite(ledgreen,0);
delay(1000);
digitalWrite(ledred,0);
digitalWrite(ledblue,0);
digitalWrite(ledgreen,255);
delay(1000);
}

# data[].attributes.body
https://dragaosemchama.com/en/2019/02/songs-for-arduino/

# data[].attributes.body
float DO = 523.25;
float RE = 587.33;
float MI = 659.26;
float FA = 698.46;
float SOL = 783.99;
float LA = 880;
float TI = 987.77;

# data[].attributes.body
void setup()
{
pinMode(3, OUTPUT);
}
void loop()
{
if (digitalRead(3) == 0)
{
instructions
}
else
{
instructions
}
}

# data[].attributes.body
#include <Servo.h>
int PIR =8;
int statePIR;
Servo myMotor;
void setup()
{
pinMode(PIR, INPUT);
myMotor.attach(12);
myMotor.write(5);
}
void loop()
{
statePIR = digitalRead(PIR);
if (statePIR == HIGH)
{
myMotor.write(175);
delay(5000);
}
else
{
myMotor.write(5);
}
}

# data[].attributes.body
float duration;
float distance;
int trig = 5; // connected to pin#5
int echo = 4; // connected to pin#4
void setup()
{
pinMode(trig, OUTPUT); //trig always is OUTPUT
pinMode(echo, INPUT);  //echo always is INPUT
}
void loop()
{
digitalWrite(trig,LOW);  // trig off
delay(1);
digitalWrite(trig,HIGH); // trig on
delay(100);
digitalWrite(trig,LOW);  // trig off
duration = pulseIn(echo,HIGH); // echo on
distance = duration/58; // converts duration into distance in centimeters
}

# data[].attributes.body
#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel Teacher = Adafruit_NeoPixel(12, 5, NEO_GRB + NEO_KHZ800);
void setup()
{
Teacher.begin();
}

void loop()
{
Teacher.setPixelColor(0,Teacher.Color(102,255,255));
Teacher.setPixelColor(1,Teacher.Color(102,255,255));
Teacher.setPixelColor(2,Teacher.Color(102,255,255));
Teacher.setPixelColor(3,Teacher.Color(102,255,255));
Teacher.setPixelColor(4,Teacher.Color(102,255,255));
Teacher.setPixelColor(5,Teacher.Color(102,255,255));
Teacher.setPixelColor(6,Teacher.Color(102,255,255));
Teacher.setPixelColor(7,Teacher.Color(102,255,255));
Teacher.setPixelColor(8,Teacher.Color(102,255,255));
Teacher.setPixelColor(9,Teacher.Color(102,255,255));
Teacher.setPixelColor(10,Teacher.Color(102,255,255));
Teacher.setPixelColor(11,Teacher.Color(102,255,255));
Teacher.show(); //Turn on the led
delay(300);
Teacher.clear();//Turn off the led
Teacher.show();
delay(300);
}

//(nombre).show(); muestra
//(nombre).clear(); borra todo

# data[].attributes.body
#include <Servo.h>
Servo myMotor; //(Nombre del motor)
void setup()
{
myMotor.attach(6); //(Pin al que está conectado el motor)
myMotor.write(5); //(Empieza en 5 grados)
delay(1000);
}
void loop()
{
myMotor.write(175); //(Se mueve a 175 grados)
delay(1000);
myMotor.write(90);
delay(2000);
}

# data[].attributes.body
int sensor = A4;
float temperatura1;
float temperaturafinal = 0;
float conversion;

void setup()
{
pinMode(A4, INPUT);
Serial.begin(9600);
}

void loop()
{
temperatura1 = analogRead(sensor);
conversion = (temperatura1 - 20) *3.04;
temperaturafinal = map(conversion,0,1023, -40,125);
Serial.print("La temperatura es ");
Serial.println(temperaturafinal);
delay(500);

}

# data[].attributes.body
void setup()
{
pinMode(3, OUTPUT);
pinMode(5, OUTPUT);
Serial.begin(9600);
}
void loop()
{
if (digitalRead(3) == 0)
{
digitalWrite(5,LOW);
}
else
{
digitalWrite(5,HIGH);
}
}

# data[].attributes.body
int sensorgas;
void setup()
{
Serial.begin(9600);
}
void loop()
{
sensorgas = analogRead(A1);
Serial.print("Valor del sensor de gas es: ");
Serial.println(sensorgas);
delay(2000);
}

# data[].attributes.body
float DO = 523.25;
float RE = 587.33;
float MI = 659.26;
float FA = 698.46;
float SOL = 783.99;
float LA = 880;
float TI = 987.77;
int bocina = 9;

void setup()
{
pinMode(bocina,OUTPUT);
}

void loop()
{
tone(bocina,DO);
delay(200);
noTone(bocina);
tone(bocina,RE);
delay(100);
noTone(bocina);
tone(bocina,TI);
delay(100);
noTone(bocina);
tone(bocina,SOL);
delay(100);
noTone(bocina);
}

# data[].attributes.body
#include <LiquidCrystal.h>
LiquidCrystal pantalla (12,11,5,4,3,2);

void setup()
{
pantalla.begin(16,2);

}

void loop()
{
pantalla.setCursor(1,0);
pantalla.print("holaaaaaaa");
pantalla.setCursor(1,1);
pantalla.print("adioooooos");
delay(1000);
pantalla.clear();
delay(1000);
}