This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h> | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
#define ONE_WIRE_BUS 2 | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | |
OneWire oneWire(ONE_WIRE_BUS); | |
DallasTemperature sensors(&oneWire); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
pinMode(4,INPUT); // PIR | |
pinMode(10,OUTPUT); // LED | |
pinMode(6,OUTPUT); // Buzzer | |
} | |
void loop() { | |
if (digitalRead(4) == HIGH) { | |
digitalWrite(10, HIGH); | |
digitalWrite(6, HIGH); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
pinMode(7, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(7, HIGH); | |
delay(100); | |
digitalWrite(7, LOW); | |
delay(500); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
int sensorValue = analogRead(A0); | |
Serial.println(sensorValue); | |
delay(1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h> //incluimos librería | |
LiquidCrystal lcd(12,11,5,4,3,2); //inicializamos con pines de Arduino | |
void setup() { | |
lcd.begin(16,2); //inicializamos pantalla | |
} | |
void loop() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//librería de la pantalla | |
#include <LiquidCrystal.h> | |
//inicializamos la pantalla con los pines de Arduino | |
//a los que la hemos conectado (RS,E,D4,D5,D6,D7) | |
LiquidCrystal lcd(12,11,5,4,3,2); | |
byte coco[8] = { | |
0b00000, | |
0b01110, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ejemplo de mensaje en display TM1637 con Arduino iluminando cada segmento de cada dígito | |
* Copyright 2016 - Fábrica Digital (fabricadigital.org) | |
* | |
* Publicado bajo licencia CC-BY-SA 4.0 | |
* Creative Commons: Reconocimiento - Compartir Igual 4.0 Internacional | |
* http://creativecommons.org/licenses/by-sa/4.0/deed.es_ES | |
* | |
* Modificado el 15 de enero de 2016 | |
* por Eloísa Romero para Fábrica Digital |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ejemplo de mensaje en display TM1637 con Arduino usando las variables SEG_ para iluminiar los segmentos | |
* Copyright 2016 - Fábrica Digital (fabricadigital.org) | |
* | |
* Publicado bajo licencia CC-BY-SA 4.0 | |
* Creative Commons: Reconocimiento - Compartir Igual 4.0 Internacional | |
* http://creativecommons.org/licenses/by-sa/4.0/deed.es_ES | |
* | |
* Modificado el 15 de enero de 2016 | |
* por Eloísa Romero para Fábrica Digital |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ejemplo de cómo mostrar números en display TM1637 con Arduino | |
* Copyright 2016 - Fábrica Digital (fabricadigital.org) | |
* | |
* Publicado bajo licencia CC-BY-SA 4.0 | |
* Creative Commons: Reconocimiento - Compartir Igual 4.0 Internacional | |
* http://creativecommons.org/licenses/by-sa/4.0/deed.es_ES | |
* | |
* Modificado el 22 de enero de 2016 | |
* por Eloísa Romero para Fábrica Digital |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ejemplo de semáforo simple para Arduino | |
* Copyright 2016 - Fábrica Digital (fabricadigital.org) | |
* | |
* Publicado bajo licencia CC-BY-SA 4.0 | |
* Creative Commons: Reconocimiento - Compartir Igual 4.0 Internacional | |
* http://creativecommons.org/licenses/by-sa/4.0/deed.es_ES | |
* | |
* Modificado el 11 de enero de 2016 | |
* por Eloísa Romero para Fábrica Digital |
OlderNewer