通过以太网监控STM32F207开发板的状态

2016-05-03  本文已影响127人  s7_200_smart
Leds控制页面
实例代码目录:STM32F207\code\STM32F2x7_ETH_LwIP_V1.0.2\Project\Standalone\httpserver
可执行程序目录:STM32F207\code\可执行程序\STM32F2x7_ETH_LwIP_V1.0.2\Standalone\httpserver

先用文本编辑器打开该网页,看看控制LED等开关的代码是什么,全部代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><title>STM32F2x7LED</title>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta content="MSHTML 6.00.2800.1561" name="GENERATOR">
<style ="font-weight: normal; font-family: Verdana;"></style></head>
<body>
<h4><small style="font-family: Verdana;"><small><big><big><big style="font-weight: bold;"><big><strong><span style="font-style: italic;">STM32F2x7 Leds control</span></strong> 
        </big></big></big></big></small></small></h4>
<hr style="width: 100%; height: 2px;">
<table style="width: 961px; height: 30px;" border="1" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="font-family: Verdana; font-weight: bold; font-style: italic; background-color: rgb(51, 51, 255); text-align: center;"><small><a href="/index.html"><span style="color: white;">Home
page</span></a></small></td>
<td style="font-family: Verdana; font-weight: bold; font-style: italic; background-color: rgb(51, 51, 255); text-align: center;"><small><a href="/STM32F2x7LED.html"><span style="color: white;">Led
control</span></a></small></td>
<td style="font-family: Verdana; font-weight: bold; font-style: italic; background-color: rgb(51, 51, 255); text-align: center;"><small><a href="/STM32F2x7ADC.shtml"><span style="color: white;">ADC
status bar</span></a></small></td>

</tr>
</tbody>
</table>
<br>
<big><br>
</big><small><span style="font-family: Verdana;">This
page
allows you to control the four LEDs: LED1, LED2, LED3 and LED4 located in
the STM322xG-EVAL board. To put on/off</span><br style="font-family: Verdana;">
<span style="font-family: Verdana;">a LED you have to
check/uncheck its corresponding checkbox. Then you have to click on
"Send" button to submit the new LEDs</span><br style="font-family: Verdana;">
<span style="font-family: Verdana;">configuration. Finally
check in the STM322xG-EVAL board that you get the desired LEDs
are putted on/off. </span><br style="font-family: Verdana;">
</small>
<br>
<br>
<table style="width: 787px; color: white; height: 31px;" white="" color="" ;="" 100="" border="0" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<td class="tabtitle" style="height: 15px; background-color: rgb(51, 51, 255);"><big><big><font size="-1"><big><big><strong>STM32
Webserver LEDs Control</strong></big></big></font></big></big></td>
</tr>
</tbody>
</table>
<br>
<form method="get" action="/leds.cgi"><input value="1" name="led" type="checkbox">LED1<br>
<input value="2" name="led" type="checkbox">LED2<br>
<input value="3" name="led" type="checkbox">LED3<br>
<input value="4" name="led" type="checkbox">LED4
<br>
<br>
<input value="Send" type="submit"> </form>
<h3><font size="-1"><span style="color: black;"></span>
</font></h3><h3 style="font-weight: normal; font-family: Verdana;"><font size="-1"><br>
</font></h3>
<span style="font-family: Verdana;"></span><font size="-1"><a style="font-family: Verdana;" href="/STM32F2x7.html"><big><span style="font-weight: bold;"></span></big></a></font>
<font size="-1"><span style="color: black;">_______________________________________________________________________________________________________________<br>
</span></font><font class="footmsg"> 
           
           
           
       <comment title="#config timefmt="%Y" " xmlns="http://disruptive-innovations.com/zoo/nvu"><!--#config timefmt="%Y" --></comment><comment title="#echo var="DATE_GMT" " xmlns="http://disruptive-innovations.com/zoo/nvu"><!--#echo var="DATE_GMT" --></comment>
<span style="color: silver;">   
         All rights
reserved © 2011 STMicroelectronics</span> </font>
</body></html>

其中关键代码是:

<form method="get" action="/leds.cgi">
<input value="1" name="led" type="checkbox">LED1<br>
<input value="2" name="led" type="checkbox">LED2<br>
<input value="3" name="led" type="checkbox">LED3<br>
<input value="4" name="led" type="checkbox">LED4

参考链接

一些疑问

Applications running in standalone (without an RTOS) or running with FreeRTOS operating system

上一篇 下一篇

猜你喜欢

热点阅读