Brief introduction
This time, the function of the cooler is divided into automatic mode and manual mode. In the automatic mode, the temperature threshold can be set on the stone TFT LCD screen. We can obtain the current ambient temperature through the DS18B20 sensor, and then compare with the set temperature threshold. When it is higher than the current ambient temperature range, esp8266 starts the stepper motor as a cooling function, and we can also stop the cooling through the stop button; in the manual mode, we can use the stone TFT The LCD directly sets the rotation speed and rotation times of the cooling motor. After the setting is completed, click the start button. Similarly, you can click the stop button to stop in advance.
In terms of device selection, this application needs to use a temperature sensor to detect the environmental temperature change. An esp8266 is used as the main control, a stepping motor, and an LED indicator. The most important is the stone TFT LCD screen, which is used to communicate with the MCU.
Device list
1. DS18B20*1;
2. Esp8266 module * 1;
3. LED lamp * 3;
4. Stepper motor * 1;
5. STONE TFT LCD screen * 1.
GUI design
Connection
Code
if(dataflag == true)
{
if(datalen == 13)
{
memset(RecievedTemp, 0 , 13);
for(cout_i = 0; cout_i < 13; cout_i ++)
{
RecievedTemp[cout_i] = Serial.read();
}
Serial.write(RecievedTemp, 13);
memset(RecievedTemp, 0 , 13);
dataflag = false;
}
}
else if(datalen == 9)
{
memset(RecievedTemp, 0 , 9);
for(cout_i = 0; cout_i < 9; cout_i ++)
{
RecievedTemp[cout_i] = Serial.read();
}
Serial.write(RecievedTemp, 9);
switch(RecievedTemp[5])
{
case 0x39://temp
if(HeadStepper.isRunning() == true)
{
HeadStepper.stop();
}
StepperStart = false;
// TempStartStop = true;
Temperatue = RecievedTemp[8];
break;
case 0x2B://temp start
TempStartStop = true;
StepperStart = false;
// HeadStepper_Setting_Run(speed_str[0], 5);
break;
case 0x2A://temp stop
if(HeadStepper.isRunning() == true)
{
HeadStepper.stop();
}
TempStartStop = false;
StepperStart = false;
// terstop = true;
break;
case 0x2E://mode gear
if(HeadStepper.isRunning() == true)
{
HeadStepper.stop();
}
settingbuf[0] = speed_str[RecievedTemp[8]];
if(RecievedTemp[8] == 3)
{
digitalWrite(ledPin_1, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(ledPin_2, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(ledPin_3, HIGH); // turn the LED on (HIGH is the voltage level)
}
else if(RecievedTemp[8] == 2)
{
digitalWrite(ledPin_1, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(ledPin_2, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(ledPin_3, HIGH); // turn the LED on (HIGH is the voltage level)
}
else
{
digitalWrite(ledPin_1, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(ledPin_2, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(ledPin_3, LOW); // turn the LED on (HIGH is the voltage level)
}
break;
case 0x34://mode timing
if(HeadStepper.isRunning() == true)
{
HeadStepper.stop();
}
settingbuf[1] = RecievedTemp[8];
break;
case 0x2C://mode start
if(settingbuf[1] == 0)
{
settingbuf[1] = 5;
}
TempStartStop = false;
StepperStart = true;
HeadStepper_Setting_Run(settingbuf[0], settingbuf[1]);
break;
case 0x2D://mode stop
if(HeadStepper.isRunning() == true)
{
TempStartStop = false;
StepperStart = false;
HeadStepper.stop();
}
break;
default:
break;
}
}
Do an action that can be kept brief, such as getting espresso or frozen yogurt. Then you can keep the date short on the off chance that you're not actually feeling the individual. Keep away from long exercises that can photos to use for tinder cause you to feel caught, similar to films, plays, shows, or supper at extravagant eateries.