桥梁温湿系统
作品图片
作品部分代码
#include "stm32f10x.h"
#include "usart.h"
#include "Led.h"
#include "SysTick.h"
#include "timer.h"
#include "string.h"
#include "stdlib.h"
#include "delay.h"
#include "sys.h"
#include "adc.h"
#include "stdio.h"
#include "lcd.h"
#include "ASCII.H"
#define Buf1_Max 60 //串口1缓存长度
#define Buf2_Max 200 //串口2缓存长度
int main(void)
{
int n=1;
delay_init(); //延时函数初始化
Adc_Init(); //ADC初始化
SysTick_Init_Config();
GPIO_Config();
USART2_Init_Config(9600);
Timer2_Init_Config();
USART1_Init_Config(9600);
Wait_CREG(); //查询等待模块注册成功5s问一次
Set_Text_Mode();//设置短信为TEXT模式
start:
LCD_Init();//液晶屏初始化
while(1)
{
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
Delay_nMs(100);
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
while(1)
{
LCD_Clr();
LCD_DisplayChar_WithAddress(0,62,'k');
while(!GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5))
{
LCD_Clr();
tempx1=0.03;
}
while(n==1)
{
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
tempx1=tempx1+0.1;
adcx1=Get_Adc_Average(ADC_Channel_0,10);//A0通道采样10次平均值
temp1=((adcx1*3.3/4096)-0.016)/0.02393+tempx1;//转换成温度1#
tempy1=tempx1;
}
}
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
tempx1=tempx1-0.1;
adcx1=Get_Adc_Average(ADC_Channel_0,10);//A0通道采样10次平均值
temp1=((adcx1*3.3/4096)-0.016)/0.02393+tempx1;//转换成温度1#
tempy1=tempx1;
}
}
LCD_DisplayChar_WithAddress(0,2,'1');
LCD_DisplayChar_WithAddress(0,10,'#');
LCD_DisplayFloat_WithAddress(0,20,temp1);//1#液晶显示输?
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10) == Bit_RESET)
{
goto start;
}
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
n=n+1;
}
}
while(!GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5))
{
LCD_Clr();
tempx2=0.03;
}
while(n==2)
{
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
tempx2=tempx2+0.1;
adcx2=Get_Adc_Average(ADC_Channel_1,10);//A0通道采样10次平均值
temp2=((adcx2*3.3/4096)-0.016)/0.02344+tempx2;//转换成温度1#
tempy2=tempx2;
}
}
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
tempx2=tempx2-0.1;
adcx2=Get_Adc_Average(ADC_Channel_1,10);//A0通道采样10次平均值
temp2=((adcx2*3.3/4096)-0.016)/0.02344+tempx2;//转换成温度1#
tempy2=tempx2;
}
}
LCD_DisplayChar_WithAddress(0,62,'2');
LCD_DisplayChar_WithAddress(0,70,'#');
LCD_DisplayFloat_WithAddress(0,80,temp2);//2#液晶显示输出
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10) == Bit_RESET)
{
goto start;
}
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
n=n+1;
}
}
while(!GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5))
{
LCD_Clr();
tempx3=0.03;
}
while(n==3)
{
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
tempx3=tempx3+0.1;
adcx3=Get_Adc_Average(ADC_Channel_4,10);//A0通道采样10次平均值
temp3=((adcx3*3.3/4096)-0.017)/0.02297+tempx3;//转换成温度1#
tempy3=tempx3;
}
}
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
tempx3=tempx3-0.1;
adcx3=Get_Adc_Average(ADC_Channel_4,10);//A0通道采样10次平均值
temp3=((adcx3*3.3/4096)-0.017)/0.02297+tempx3;//转换成温度1#
tempy3=tempx3;
}
}
LCD_DisplayChar_WithAddress(2,2,'3');
LCD_DisplayChar_WithAddress(2,10,'#');
LCD_DisplayFloat_WithAddress(2,20,temp3);//3#液晶显示输出
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10) == Bit_RESET)
{
goto start;
}
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
n=n+1;
}
}
while(!GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5))
{
LCD_Clr();
tempx4=0.03;
}
while(n==4)
{
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
tempx4=tempx4+0.1;
adcx4=Get_Adc_Average(ADC_Channel_5,10);//A0通道采样10次平均值
temp4=((adcx4*3.3/4096)-0.017)/0.02337+tempx4;//转换成温度1#
tempy4=tempx4;
}
}
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
tempx4=tempx4-0.1;
adcx4=Get_Adc_Average(ADC_Channel_5,10);//A0通道采样10次平均值
temp4=((adcx4*3.3/4096)-0.017)/0.02337+tempx4;//转换成温度1#
tempy4=tempx4;
}
}
LCD_DisplayChar_WithAddress(2,62,'4');
LCD_DisplayChar_WithAddress(2,70,'#');
LCD_DisplayFloat_WithAddress(2,80,temp4);//4# 液晶显示输出
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10) == Bit_RESET)
{
goto start;
}
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
n=n+1;
}
}
while(!GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5))
{
LCD_Clr();
tempx5=0.03;
}
while(n==5)
{
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
tempx5=tempx5+0.1;
adcx4=Get_Adc_Average(ADC_Channel_6,10);//A0通道采样10次平均值
temp5=((adcx5*3.3/4096)-0.018)/0.02291+tempx5;//转换成温度1#
tempy5=tempx5;
}
}
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
tempx5=tempx5-0.1;
adcx5=Get_Adc_Average(ADC_Channel_6,10);//A0通道采样10次平均值
temp5=((adcx5*3.3/4096)-0.018)/0.02291+tempx5;//转换成温度1#
tempy5=tempx5;
}
}
LCD_DisplayChar_WithAddress(4,2,'5');
LCD_DisplayChar_WithAddress(4,10,'#');
LCD_DisplayFloat_WithAddress(4,20,temp5);//5# 液晶显示输出
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10) == Bit_RESET)
{
goto start;
}
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
n=n+1;
}
}
while(!GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5))
{
LCD_Clr();
tempx6=0.03;
}
while(n==6)
{
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
tempx6=tempx6+0.1;
adcx6=Get_Adc_Average(ADC_Channel_7,10);//A0通道采样10次平均值
temp6=((adcx6*3.3/4096)-0.017)/0.02398+tempx6;//转换成温度1#
tempy6=tempx6;
}
}
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
tempx6=tempx6-0.1;
adcx6=Get_Adc_Average(ADC_Channel_7,10);//A0通道采样10次平均值
temp6=((adcx6*3.3/4096)-0.017)/0.02398+tempx6;//转换成温度1#
tempy6=tempx6;
}
}
LCD_DisplayChar_WithAddress(4,62,'6');
LCD_DisplayChar_WithAddress(4,70,'#');
LCD_DisplayFloat_WithAddress(4,80,temp6);//6# 液晶显示输出
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10) == Bit_RESET)
{
goto start;
}
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
n=n+1;
}
}
while(!GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5))
{
LCD_Clr();
tempx7=0.03;
}
while(n==7)
{
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
tempx7=tempx7+0.1;
adcx7=Get_Adc_Average(ADC_Channel_8,10);//A0通道采样10次平均值
temp7=((adcx7*3.3/4096)-0.018)/0.02246+tempx7;//转换成温度1#
tempy7=tempx7;
}
}
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
tempx7=tempx7-0.1;
adcx7=Get_Adc_Average(ADC_Channel_8,10);//A0通道采样10次平均值
temp7=((adcx7*3.3/4096)-0.018)/0.02246+tempx7;//转换成温度1#
tempy7=tempx7;
}
}
LCD_DisplayChar_WithAddress(6,2,'7');
LCD_DisplayChar_WithAddress(6,10,'#');
LCD_DisplayFloat_WithAddress(6,20,temp7);//7# 液晶显示输出
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10) == Bit_RESET)
{
goto start;
}
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
n=n+1;
}
}
while(!GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5))
{
LCD_Clr();
tempx8=0.03;
}
while(n==8)
{
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_11) == 0)
{
tempx8=tempx8+0.1;
adcx8=Get_Adc_Average(ADC_Channel_9,10);//A0通道采样10次平均值
temp8=((adcx8*3.3/4096)-0.018)/0.02261+tempx8;//转换成温度1#
tempy8=tempx8;
}
}
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
Delay_nMs(100);
LCD_DisplayChar_WithAddress(0,62,'k');
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_12) == 0)
{
tempx8=tempx8-0.1;
adcx8=Get_Adc_Average(ADC_Channel_9,10);//A0通道采样10次平均值
temp8=((adcx8*3.3/4096)-0.018)/0.02261+tempx8;//转换成温度1#
tempy8=tempx8;
}
}
LCD_DisplayChar_WithAddress(6,62,'8');
LCD_DisplayChar_WithAddress(6,70,'#');
LCD_DisplayFloat_WithAddress(6,80,temp8);//8# 液晶显示输出
if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10) == Bit_RESET)
{
goto start;
}
if(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
{
n=n+1;
}
}
if(n>8)n=1; //重置
}
}
}
Send_Text_Sms();
}
}
wiqer机器人省科研立项
作品图片
作品部分代码
Androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.administrator.wiqer13"
android:versionCode="1"
android:versionName="1.0"
>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"></uses-permission>
<uses-permission android:name="adnroid.permission.ACCESS_CHECKIN_PROPERTTES"></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
<application
android:allowBackup="true"
android:icon="@mipmap/icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/icon"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".wiqer"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".kzSActivitiy">
</activity>
<activity android:name=".SPKongZhi"
android:screenOrientation="landscape">
</activity>
<activity android:name=".TPXinXi">
</activity>
<activity android:name=".FaSong">
</activity>
<activity android:name=".FenXiang">
</activity>
<activity android:name=".GitWifi">
</activity>
<activity android:name=".GJTiaoJie">
</activity>
<activity android:name=".FaSong$MakeText">//要选择路径
</activity>
<activity android:name=".Main"
android:screenOrientation="landscape"
android:theme="@style/TranslucentTheme">
</activity>
<activity android:name=".TestWifiActivity" />
</application>
</manifest>
人事管理系统
作品图片
作品部分代码
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- 指定常量,spring的加载位置,默认是在/WEB-INF/下 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext*.xml</param-value>
</context-param>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter>
<filter-name>authority</filter-name>
<filter-class>com.hrmsys.filter.AuthorityFilter</filter-class>
</filter>
<filter>
<filter-name>back</filter-name>
<filter-class>com.hrmsys.filter.BackFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>authority</filter-name>
<url-pattern>/jsp/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>back</filter-name>
<url-pattern>/index.jsp</url-pattern>
</filter-mapping>
<listener>
<listener-class>com.hrmsys.listener.LogListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- follow is servlet config -->
<servlet>
<servlet-name>validateCodeServlet</servlet-name>
<servlet-class>com.hrmsys.servlet.ValidateCodeServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>validateCodeServlet</servlet-name>
<url-pattern>/validate.jsp</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
跨境电商系统
作品图片
作品部分代码
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>YoulegouStore</display-name>
<!-- 加载首页数据 -->
<filter>
<filter-name>LoadingIndexDateFilter</filter-name>
<filter-class>cn.xwkj.filter.LoadingIndexDateFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LoadingIndexDateFilter</filter-name>
<url-pattern>/index.jsp</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>RegisterServlet</servlet-name>
<servlet-class>cn.xwkj.servlet.RegisterServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>checkUsernameServlet</servlet-name>
<servlet-class>cn.xwkj.servlet.checkUsernameServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>ProServlet</servlet-name>
<servlet-class>cn.xwkj.servlet.ProServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>BaseServlet</servlet-name>
<servlet-class>cn.xwkj.servlet.BaseServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>UserServlet</servlet-name>
<servlet-class>cn.xwkj.servlet.UserServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>indexServlet</servlet-name>
<servlet-class>cn.xwkj.servlet.indexServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>GetCaptcha</servlet-name>
<servlet-class>cn.xwkj.servlet.GetCaptcha</servlet-class>
</servlet>
<servlet>
<servlet-name>PhoneServlet</servlet-name>
<servlet-class>cn.xwkj.servlet.PhoneServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>checkNumberServlet</servlet-name>
<servlet-class>cn.xwkj.servlet.checkNumberServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RegisterServlet</servlet-name>
<url-pattern>/Register</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>checkUsernameServlet</servlet-name>
<url-pattern>/checkUsername</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ProServlet</servlet-name>
<url-pattern>/pro</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>BaseServlet</servlet-name>
<url-pattern>/BaseServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserServlet</servlet-name>
<url-pattern>/user</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>indexServlet</servlet-name>
<url-pattern>/index</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GetCaptcha</servlet-name>
<url-pattern>/getCaptcha</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PhoneServlet</servlet-name>
<url-pattern>/PhoneServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>checkNumberServlet</servlet-name>
<url-pattern>/checkNumber</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
链接: link