boas ![]()
Ando com uma dúvida queria juntar esses dois códigos, mas não tenho ideia como fazer isso... :~
Eu estou disposto a ouvir todas as sugestões obg
trabalho-1
#include <dht.h>
#define dht_dpin A1
dht DHT;
void setup()
{
Serial.begin(9600);
delay(1000);
}
void loop()
{
DHT.read11(dht_dpin);
Serial.print("Umidade = ");
Serial.print(DHT.humidity);
Serial.print(" % ");
Serial.print("Temperatura = ");
Serial.print(DHT.temperature);
Serial.println(" Celsius ");
delay(2000);
}
#include "EtherShield.h"
#include "ETHER_28J60.h"
static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24}; //Endereço MAC - Camada de Enlace
static uint8_t ip[4] = {192, 168, 0,15}; //Endereço IP - Camada de Rede
static uint16_t port = 80; //Porta padrão protocolo HTTP
ETHER_28J60 e;
int analog;
float temperatura;
void setup()
{
e.setup(mac, ip, port);
}
void loop()
{
if (e.serviceRequest())
{
e.print("WebServer Simples");//Instruções HTML.
e.print("
Temperatura
");
e.print("Temperatura em Celsius: ");
analog = analogRead(0);
temperatura = (analog * 0.00488); // 5V / 1023 = 0.00488 (precisão do A/D)
temperatura = temperatura * 100; //Converte milivolts para graus celcius, lembrando que a cada 10mV equi
e.print(temperatura);
e.print("
Desenvolvido por Allan Romanato");
e.respond();
}
delay(100);
}
-Meu objectivo é juntar o trabalho-1 ao EtherShield ,será que é possível :S