基本信息
源码名称:51单片机温度采集和光控
源码大小:2.45M
文件格式:.zip
开发语言:C/C++
更新时间:2020-06-15
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍
采用51单片机检测大棚内的温度,并控光

void led_service()
{
if(uiGuangZhao!=0)
{
if(ui1750Temp<=100)
{
  P1=0x00;
}
else if(100<ui1750Temp&&ui1750Temp<=200)
{
  P1=0xc0;
}
else if(200<ui1750Temp&&ui1750Temp<=300)
{
  P1=0xe0;
}
else if(300<ui1750Temp&&ui1750Temp<=400)
{
  P1=0xf0;
}
else if(400<ui1750Temp&&ui1750Temp<=500)
{
  P1=0xf8;
}
else if(500<ui1750Temp&&ui1750Temp<=600)
{
  P1=0xfc;
}
else if(600<ui1750Temp&&ui1750Temp<=700)
{
  P1=0xfe;
}
else if(700<ui1750Temp)
{
  P1=0xff;
}


if(uiTempSht20/10<=30)
{
  led4=0;led5=1;led6=1;
}
else if(30<uiTempSht20/10&&uiTempSht20/10<=40)
{
  led4=0;led5=0;led6=1;
}
else if(40<uiTempSht20/10)
{
  led4=0;led5=0;led6=0;
}

if(uiHumiSht20/10<=60)
{
  led1=1;led2=1;
}
else if(60<uiHumiSht20/10&&uiHumiSht20/10<=85)
{
  led1=0;led2=1;
}
else if(uiHumiSht20/10>85)
{
  led1=0;led2=0;
}
}
else
{
P1=0xff;
led1=1;led2=1;led4=1;led5=1;led6=1;
}
}

【文件目录】

011-大棚灯光

├── 上位机
│   ├── a.xlsx
│   ├── 上位机设计
│   │   ├── App.config
│   │   ├── Form1.Designer.cs
│   │   ├── Form1.cs
│   │   ├── Form1.resx
│   │   ├── Program.cs
│   │   ├── Properties
│   │   │   ├── AssemblyInfo.cs
│   │   │   ├── Resources.Designer.cs
│   │   │   ├── Resources.resx
│   │   │   ├── Settings.Designer.cs
│   │   │   └── Settings.settings
│   │   ├── bin
│   │   │   └── Debug
│   │   │       ├── ICSharpCode.SharpZipLib.dll
│   │   │       ├── NPOI.OOXML.dll
│   │   │       ├── NPOI.OpenXml4Net.dll
│   │   │       ├── NPOI.OpenXmlFormats.dll
│   │   │       ├── NPOI.dll
│   │   │       ├── 上位机设计.exe
│   │   │       ├── 上位机设计.exe.config
│   │   │       └── 上位机设计.pdb
│   │   ├── obj
│   │   │   └── Debug
│   │   │       ├── DesignTimeResolveAssemblyReferences.cache
│   │   │       ├── DesignTimeResolveAssemblyReferencesInput.cache
│   │   │       ├── TempPE
│   │   │       ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│   │   │       ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│   │   │       ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│   │   │       ├── 上位机设计.Form1.resources
│   │   │       ├── 上位机设计.Properties.Resources.resources
│   │   │       ├── 上位机设计.csproj.CopyComplete
│   │   │       ├── 上位机设计.csproj.CoreCompileInputs.cache
│   │   │       ├── 上位机设计.csproj.FileListAbsolute.txt
│   │   │       ├── 上位机设计.csproj.GenerateResource.cache
│   │   │       ├── 上位机设计.csprojAssemblyReference.cache
│   │   │       ├── 上位机设计.exe
│   │   │       └── 上位机设计.pdb
│   │   └── 上位机设计.csproj
│   └── 上位机设计.sln
├── 单片机1
│   ├── Project
│   ├── Project.MAP
│   ├── Project.SBR
│   ├── Project.hex
│   ├── Project.lnp
│   ├── Project.plg
│   ├── Project.uvopt
│   ├── Project.uvproj
│   ├── Project_uvopt.bak
│   ├── Project_uvproj.bak
│   ├── bh1750.LST
│   ├── bh1750.OBJ
│   ├── bh1750.c
│   ├── bh1750.h
│   ├── delay.LST
│   ├── delay.OBJ
│   ├── delay.c
│   ├── delay.h
│   ├── initial.LST
│   ├── initial.OBJ
│   ├── initial.c
│   ├── initial.h
│   ├── interrupt.LST
│   ├── interrupt.OBJ
│   ├── interrupt.c
│   ├── interrupt.h
│   ├── main.LST
│   ├── main.OBJ
│   ├── main.c
│   ├── main.h
│   ├── sht20.LST
│   ├── sht20.OBJ
│   ├── sht20.c
│   ├── sht20.h
│   ├── usart.LST
│   ├── usart.OBJ
│   ├── usart.c
│   └── usart.h
└── 单片机2
    ├── Project
    ├── Project.MAP
    ├── Project.SBR
    ├── Project.hex
    ├── Project.lnp
    ├── Project.plg
    ├── Project.uvopt
    ├── Project.uvproj
    ├── Project_uvopt.bak
    ├── Project_uvproj.bak
    ├── bh1750.LST
    ├── bh1750.OBJ
    ├── bh1750.c
    ├── bh1750.h
    ├── delay.LST
    ├── delay.OBJ
    ├── delay.c
    ├── delay.h
    ├── initial.LST
    ├── initial.OBJ
    ├── initial.c
    ├── initial.h
    ├── interrupt.LST
    ├── interrupt.OBJ
    ├── interrupt.c
    ├── interrupt.h
    ├── main.LST
    ├── main.OBJ
    ├── main.c
    ├── main.h
    ├── sht20.LST
    ├── sht20.OBJ
    ├── sht20.c
    ├── sht20.h
    ├── usart.LST
    ├── usart.OBJ
    ├── usart.c
    └── usart.h

10 directories, 111 files