Things used in this project

Hardware components:
A000066 iso both
Arduino Arduino UNO & Genuino UNO
×1
09590 01
LED (generic)
Yellow
×3
Omron b3f 1000 image 75px
SparkFun Pushbutton switch 12mm
×3
Mfr 25fbf52 221r sml
Resistor 221 ohm
Tip: 220 Ohm
×1
Mfr 25frf52 1k sml
Resistor 1k ohm
×3
Openbuilds cable ties
OpenBuilds Cable Ties (10 Pack)
All is needed.
×1
Tens70
9V battery (generic)
Or another Power supply from 6v to 12v.
×1
Adafruit industries ada62 image 75px
USB-A to B Cable
Or USB-A to Mini-USB
×1
13268 01
SparkFun SparkFun Snappable Protoboard
×1
Software apps and online services:
Ide web
Arduino Arduino IDE
Hand tools and fabrication machines:
pliers
Screwdriver
Computer

Schematics

Circuit
Img 20170412 203124 dlamnc4qyq

Code

BlinkArduino
/***   Included libraries  ***/


/***   Global variables and function definition  ***/
const int led_i = 12;
const int led_d = 11;
const int boton_i = 7;
const int boton_d = 6;
const int boton_emg = 8;
float encendido = 333;
float apagado = 666;
float bucle = 0;

/***   Setup  ***/
void setup() {
    pinMode(led_i, OUTPUT);
    pinMode(led_d, OUTPUT);
    pinMode(boton_i, INPUT);
    pinMode(boton_d, INPUT);
    pinMode(boton_emg, INPUT);
    digitalWrite(led_i, HIGH);
    digitalWrite(led_d, HIGH);
    delay(1000);
    digitalWrite(led_i, LOW);
    digitalWrite(led_d, LOW);
}

/***   Loop  ***/
void loop() {
    bucle = 0;
    if (digitalRead(boton_i) == true) {
        for (bucle = 0; bucle <= 10; bucle += 1) {
            digitalWrite(led_i, HIGH);
            delay(encendido);
            digitalWrite(led_i, LOW);
            delay(apagado);
        }
    }
    if (digitalRead(boton_d) == true) {
        for (bucle = 0; bucle <= 10; bucle += 1) {
            digitalWrite(led_d, HIGH);
            delay(encendido);
            digitalWrite(led_d, LOW);
            delay(apagado);
        }
    }
    while (digitalRead(boton_emg) == true) {
        digitalWrite(led_d, HIGH);
        digitalWrite(led_i, HIGH);
        delay(encendido);
        digitalWrite(led_d, LOW);
        digitalWrite(led_i, LOW);
        delay(apagado);
    }
}

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Electronic Voting Machine Using Arduino
Easy
  • 157
  • 5

It is an EVM using Arduino. There are five switches in all, assigned for various activities.

Assemble a PCB using Upverter and Fusion PCBA
Easy
  • 286
  • 5

Full instructions

Using an existing well written guide, our Hackster Live chapter designed, fabricated, and assembled an Arduino shield for a Simon Says game.

Retro Nokia Snake Game with Arduino
Easy
  • 3,302
  • 23

Full instructions

Ever wish you could go back to the happy 90's and play snake on your old Nokia phone? Grab on to your joystick for this blast-from-the-past.

MyHumidity controlled by BME280 and Photon
Easy
  • 29
  • 1

Full instructions

Checks if humidity threshold is reached and informs the user by using Blynk/IFTTT-services with softAP integration.

Use Scratch-like Software to build your Sonar System
Easy
  • 250
  • 2

Full instructions

In this project, you can build and display a Sonar system by using graphical programming software Kittenblock, developed based on Scratch3.0

RPi Serial Console Automation using Arduino
Easy
  • 234
  • 3

Full instructions

A follow-up article to "One Button Restart of a Stalled Raspberry Pi": 3 digital pins provide 8 separate functions that can be called.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login