DHT11_delay_ms(1000); //After DHT11 is powered on, it needs to wait for 1S to get past the unstable state. No instructions can be sent during this period.
P0=0xff;
while (1)
{
caidan();
if(an==0)
{
DHT11_receive();
shumaguan_show();
panduan();
}
if(an==1)
{
Beep=1;
DelayMs(10);
move_2(); //2 bits right shift
up_down();
LED[1]=AlarmHH/10; // Humidity upper limit alarm
LED[0]=AlarmHH%10;
LED[2]=AlarmHL%10; // Humidity lower limit alarm
LED[3]=AlarmHL/10;
LED[7]=AlarmTL/10; // Temperature lower limit alarm
LED[6]=AlarmTL%10;
LED[4]=AlarmTH%10; // Temperature upper limit alarm
LED[5]=AlarmTH/10;
if(move==0) LED2_Display(4);
if(move==1) LED2_Display(3);
if(move==2) LED2_Display(2);
if(move==3) LED2_Display(1);
}
if(K5==0)
{
DelayMs(10); // Remove the jitter of button pressing
while(!K5); // Wait for the key to be released
DelayMs(10);
TAB[0]=rec_dat[15];
TAB[1]=rec_dat[16];
TAB[2]=rec_dat[17];
TAB[3]=rec_dat[18];
TAB[4]=0x00;
for(i=0;i<4;i++)
{
send(TAB[i]);
DelayMs(200);
}
}
}
}
Previous article:Three methods of single chip microcomputer button
Next article:Speech synthesis module based on 51 single chip microcomputer
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- What is the difference between low inertia and high inertia of servo motors?
- What will happen if the servo motor inertia is insufficient?
- How to select parameters for servo motor inertia size
- The difference between the servo motor moment of inertia and the load moment of inertia
- How to calculate the inertia of servo motor and reducer
- What is the difference between a servo press and a normal press?
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Controlling GaN power stages with the TI Hercules LaunchPad development kit
- Lora parameter calculation and RF transmission distance calculation formula and tools
- [Blood Oximeter] Disassembly Part 1 Unboxing
- Remote upgrade of HuaDa MCU HC32L110
- How much do you know about the key technologies of Wi-Fi 6?
- New circuit principle
- The CoreMark scores of the same STM32 microcontroller vary greatly. What is the reason?
- MSP430 MCU timer TA interrupt program
- Share a video explanation by a senior hardware engineer - 3C certification surge and voltage drop test standards - the key is free
- [Qinheng Trial] CH559EVT Trial 3: Flowing Water Light