Objetivo
El objetivo de este manual es ofrecer la manera de testear el modulo de temperatura KY-001 con nuestro Uno R3 midiendo la temperatura. Para poder utilizar este modulo debemos tener las librerias Onewire y DallasTemperature instaladas. (Ubicadas en nuestra pestaña de Manuales y Documentacion)
Materiales necesarios:
- Modulo Flash Automatico de 7 colores KY-034 para Arduino
- Uno R3 + Cable USB para Arduino
- Resistencia 4.7k-ohm 1/4W - 5%
- Jumpers Macho-Hembra 20cm
Diagrama de conexión:
CONEXIONES AL ARDUINO
SENSOR |
ARDUINO |
Pin ( + ) |
5V |
OUT |
Pin 13 |
Pin ( - ) |
GND |
CODIGO BASICO DE EJEMPLO PARA ARDUINO
/*
Blink
Turns on an LED on for two second, then off for two second, repeatedly.
This example code is in the public domain.
*/
void setup () {
// Initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode (13, OUTPUT);
}
void loop () {
digitalWrite (13, HIGH); // set the LED on
delay (2000); // wait for a second
digitalWrite (13, LOW); // set the LED off
delay (2000); // wait for a second
}