Un deporte interesante, divertido é inteligente.

Paso a paso, para llegar a la meta; eliminado dificultades y obstaculos. No es facil, pero lo podemos lograr, gracias.

Tecromex

El Programa Es Posible Con Tú Inverción.

int trigPin = 9;
int echoPin = 10;
int led = 7;
void setup () {
Serial.begin(9600);
pinMode(led, OUTPUT);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
void loop() {
long duration, distance;
digitalWrite(trigPin,HIGH);
delayMicroseconds(1000);
digitalWrite(trigPin, LOW);
duration=pulseIn(echoPin, HIGH);
distance=(duration/2)/29.1;
Serial.print(distance);
Serial.println("CM");
delay(20);
if((distance<=20))
{
digitalWrite(led, HIGH);
}
else if(distance>20)
{
digitalWrite(led, LOW);
}
}

⚡ Sensor LED   ✅ 99VA § C1

I.- Arduino Uno R3 ATmega328 & ATMEGA 16U2

II.- Ultrasonic module HC-SR04 distance measuring sensor

III.- Mini small solderless breadboard

IV.- LED: (long = pos   ▚   short = neg)

V.- 6 Breadboard jumper cables

VI.- Cable male DC plug clip 2.1 X 5.5mm

VII.- 9V Battery

Instruc. Arduino, Ultrasonic sensor, Mini breadboard:

❦   pin 5V ↠ Vcc   |   pin 9 ↠ Trig   |   pin 10 ↠ Echo
pin GND ( pin 5V ↧ pin GND ) ↠ Gnd
❦   pin GND ( pin 5V, pin GND ↧ pin GND ) ↠ LED neg
pin 7 ↠ LED pos

9:30am9Nov2019

arduino.cc

Todos Podemos Participar & Ganar.


void setup () {
pinMode(7, OUTPUT);
pinMode(5, OUTPUT);
pinMode(3, OUTPUT);
}
void loop() {
for (int i=11;i>=0;i=i-2)
{
digitalWrite(i-8, LOW);
digitalWrite(i-6, LOW);
digitalWrite(i-4, LOW);
digitalWrite(i-2, LOW);
digitalWrite(i, HIGH);
digitalWrite(i+2, HIGH);
digitalWrite(i+4, HIGH);
digitalWrite(i+6, LOW);
digitalWrite(i+8, LOW);
delay(500);
}
}

⚡ Colores LED   ✅ 99VA § C2

I.- Arduino Uno R3 ATmega328 & ATMEGA 16U2

II.- Mini small solderless breadboard

III.- 3 LED (long = pos   ▚   short = neg)

IV.- 6 Breadboard jumper cables

V.- Cable male DC plug clip 2.1 X 5.5mm

VI.- 9V Battery

Instruc. Arduino & Mini breadboard,
LED (long = pos   ▚   short = neg):

❦   pin 7 ↠ LED pos   |   pin 5 ↠ LED pos   |   pin 3 ↠ LED pos
❦   3 pin GND ↠ 3 LED neg

9:45am9Nov2019

arduino.cc

TRM TRM TRM TRM

  # 349