Envio Grátis a partir de 90€
, ,

Módulo sensor de temperatura e humidade digital SHT10 para Arduino Keyestudio

REF: KS0268


13,38 IVA INCL.

/* Lab10 - SHT1x serials (SHT10, SHT11, SHT15) Reading sample of hygrothermograph
*
* Need to install SHT1x Library:
* [url]https://github.com/practicalarduino/SHT1x/[/url]
*/

#include <SHT1x.h>

// define SHT1x connection pin
#define dataPin 11
#define clockPin 10

// Initialize sht1x object
SHT1x sht1x(dataPin, clockPin);

void setup()
{
Serial.begin(9600);
}

void loop()
{
// declare three variables, representing temperature (Celsius), temperature (Fahrenheit) and humidity
float temp_c, temp_f, humidity;

// read SHT1x temperature and humidity value
temp_c = sht1x.readTemperatureC();
temp_f = sht1x.readTemperatureF();
humidity = sht1x.readHumidity();

// Output the temperature and humidity value to Serial Port
Serial.print("Temperature: ");
Serial.print(temp_c, 1); // Show one after the decimal point
Serial.print("C / ");
Serial.print(temp_f, 1); // Show one after the decimal point
Serial.print("F. Humidity: ");
Serial.print(humidity);
Serial.println("%");

delay(1000);
}

 

Baseada em 0 avaliações

0.0 pontuação
0
0
0
0
0

Seja o primeiro a avaliar “Módulo sensor de temperatura e humidade digital SHT10 para Arduino Keyestudio”

Não há comentários ainda.