#define COMSerial Serial
#define ShowSerial SerialUSB
TH02_dev TH02;
endif
void setup() {
ShowSerial.begin(9600); // start serial for output
ShowSerial.println("****TH02_dev demo by seeed studio****\n");
/* Power up,delay 150ms,until voltage is stable */
delay(150);
/* Reset HP20x_dev */
TH02.begin();
delay(100);
/* Determine TH02_dev is available or not */
ShowSerial.println("TH02_dev is available.\n");
Hello,
first of all I'm new in coding and in IOT stuff, sorry if ii do'nt use the right synthaxe.
I have an issue with this Sketch:
Arduino : 2.1.0 ( windows 10), Board : " Arduino MKR WIFI 1010"
here is the full sketch ( i use the exemple TH02_demo)
include
include "Arduino.h"
include "Wire.h"
include "THSensor_base.h"
define ShowSerial Serial
ifdef AVR
endif
ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
endif
ifdef ARDUINO_ARCH_STM32F4
endif
void setup() { ShowSerial.begin(9600); // start serial for output
}
void loop() { float temper = TH02.ReadTemperature(); ShowSerial.print("Temperature: "); ShowSerial.print(temper); ShowSerial.println("C\r\n"); //Serial.print("%\t");
}
my issue is : i always have the sames results, humidity = 24% ans Température = 50°C
and i still have there result if i unplug my sensor :/
I have try other code the results are the same.
For plug my sensor i have follow the documentation and connect
black --> GND RED--> 5V white--> SDA YEllow --> SCL
Thank in advance,