I am trying to make a humidification system using this guide (How to Make Arduino Automatic Temperature& Humidity Controller #Howto #Arduino #Automatic - YouTube), and everything is working fine except for the atomization disc, where it doesn't seem to be powered at all. The guy in the video seems to have soldered the positive and negative poles of the humidifier, but I just inserted the jumper cable pins through the hole, and I'm not sure if that is the cause of the issue. The only thing my project differs from his is that I am using a DHT22 sensor instead of a DHT11 sensor, but I have already made necessary modifications to the code.
I have attached some photos of my circuit, and I would greatly appreciate some guidance, thanks!
#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); //Set the device name: I2C-SSD1306-128*64 (OLED)
#include "DHT.h"
#define DHTPIN 2 // Connect DHT22 to digital pin 2
#define DHTTYPE DHT22
#define jiashiPin 3 // Connect "jiashi" pin to digital pin 3
#define button 12
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
pinMode(jiashiPin, OUTPUT);
pinMode(button, INPUT);
dht.begin();
}
void loop() {
float Humid = dht.readHumidity();
float Temp = dht.readTemperature();
Serial.print("Temp: ");
Serial.print(Temp);
Serial.print("°C");
delay(1000);
Serial.print("Humid: ");
Serial.print(Humid);
Serial.print("%");
delay(1000);
u8g.firstPage();
do {
u8g.setFont(u8g_font_gdr14r);
u8g.setPrintPos(25, 18);
u8g.print("Kong");
u8g.setFont(u8g_font_9x18);
u8g.setPrintPos(1, 40);
u8g.print("Temp: ");
u8g.print(Temp);
u8g.print(" C");
u8g.setPrintPos(1, 60);
u8g.print("Humid: ");
u8g.print(Humid);
u8g.print("%");
} while (u8g.nextPage());
if (Humid > 90) {
digitalWrite(jiashiPin, LOW);
} else {
digitalWrite(jiashiPin, HIGH);
}
}