Documente Academic
Documente Profesional
Documente Cultură
Daos en los ojos.- La exposicin a dosis altas de rayos UV puede daar los
ojos, especialmente la crnea que absorbe muy fcil estas radiaciones. A veces
se producen cegueras temporales y la exposicin crnica se asocia con mayor
facilidad de desarrollar cataratas.
Shieldarduino
Servidor centralizado
de recoleccin de dato
WI-FI
Recoleccin
de informacin
arduino
ACONDICIONAMIENTO CONVERSION
ANALOGICA
DIGITAL con Placa
Ethernet
FOTODIODO
UV-B
Placa Arduino
Mega
Shield Ethernet
para Arduino
UV Sensor (SKU:TOY0044)
Specification
Input voltage:5V
UV wavelength detect:200-370nm
Response time:<0.5s
Operating temperature:-20-85
Interface:Anolog IO x1
Size:27 x 22mm
1
2
3
/*
# This Sample code is for testing the UV Sensor .
#Connection:
VCC-5V
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GND-GND
OUT-Analog pin 0
*/
void setup()
{
Serial.begin(9600);// open serial port, set the baud rate to 9600 bps
}
void loop()
{
int sensorValue;
sensorValue = analogRead(0);//connect UV sensors to Analog 0
Serial.println(sensorValue);//print the value to serial
delay(200);
}
Cdigo Arduino.
/*
Servidor Web UV
Javier Cornejo Flores
*/
#include <SPI.h>
#include <Ethernet.h>
void setup() {
// modo diagnostico lanza datos por el puerto serial del arduino.
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
server.begin();
Serial.print("la ip del arduino es : ");
Serial.println(Ethernet.localIP());
}
void loop() {
// carga el valor de conversor a la variable sensorValue
sensorValue = analogRead(0);
EthernetClient client = server.available();
if (client) {
Serial.println("new client");
// Arranca el servicio web , si hay algun cliente conectado.
boolean currentLineIsBlank = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
Serial.write(c);
// Inicia el envio de datos siguiendo el standar http.
if (c == '\n' && currentLineIsBlank) {
// Envia la cabecera stardar http
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connection: close"); // the connection will be closed after
completion of the response
client.println("Refresh: 5"); // refresh the page automatically every 5 sec
client.println();
client.println("<!DOCTYPE HTML>");
client.println("<html>");
client.println("<CENTER>");
client.println("<H1> CENTRAL DE MONITOREO - 1.0</H1>");
client.println("<H3>Curso Instrumentacion
Electronica</CENTER></H3><br />");
// output the value of each analog input pin
int analogChannel = 0;
int sensorReading = analogRead(analogChannel);
client.print("La entrada analogica es la numero ");
client.print(analogChannel);
client.print(" el valor de la salida del conversor es : ");
client.print(sensorValue);
client.println("<br>");
client.println("<br>");
// conversion a indica uv
indiceUV = 9;
}
if (sensorValue < 180)
{
indiceUV = 8;
}
if (sensorValue < 162)
{
indiceUV = 7;
}
if (sensorValue < 142)
{
indiceUV = 6;
}
if (sensorValue < 124)
{
indiceUV = 5;
}
if (sensorValue < 103)
{
indiceUV = 4;
}
if (sensorValue < 83)
{
indiceUV = 3;
}
client.println("</html>");
break;
}
if (c == '\n') {
// you're starting a new line
currentLineIsBlank = true;
}
else if (c != '\r') {
Salida en navegador