#include DHT dht(7, DHT22); int gasSensor = A5; int motionSensor = 4; int motionStatus = 0; int gasThreshold = 250; int bluetoothState = 0; void setup() { pinMode(gasSensor, INPUT); pinMode(motionSensor, INPUT); Serial.begin(9600); dht.begin(); } void loop () { float hum = dht.readHumidity(); int temp = dht.readTemperature(); int gasLevel = analogRead(gasSensor); bool motionStatus = digitalRead(motionSensor); if (temp%100==temp) { Serial.print("0"); } if (temp%10==temp) { Serial.print("0"); } Serial.print(temp); if (gasLevel%1000==gasLevel) { Serial.print("0"); } if (gasLevel%100==gasLevel) { Serial.print("0"); } if (gasLevel%10==gasLevel) { Serial.print("0"); } Serial.print(gasLevel); Serial.print(motionStatus); delay(5000); }