<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ks_c_5601-1987">
<META content="MSHTML 5.50.4915.500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=869104821-29102002>Write
the program on the Ethernut to return the temperature ONCE only in a HTML page
that has a REFRESH tag up the top of it. Then the browser will request the page
every 10 seconds, updating the page with the current
temperature.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=869104821-29102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=869104821-29102002>Alastair</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
en-nut-discussion-admin@egnite.de
[mailto:en-nut-discussion-admin@egnite.de]<B>On Behalf Of
</B>Á¶»ó¸¸<BR><B>Sent:</B> Wednesday, 30 October 2002 6:26 AM<BR><B>To:</B>
en-nut-discussion@egnite.de<BR><B>Subject:</B> [En-Nut-Discussion]
sorry!(except file)<BR><BR></FONT></DIV>
<DIV><FONT size=2><FONT size=2>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV> </DIV>
<DIV>I would like to see temperatue with web and inserted ADC souce code
into</DIV>
<DIV>httpd.c sample as below.</DIV>
<DIV> </DIV>
<DIV>When I clicked sensor cgi part , I could see my result as
below</DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>00111000 0056 00111000 0056 00111000 0056 00111000 0056
</FONT></DIV>
<DIV><FONT size=2>00111000 0056 00111000 0056 00111000 0056 00111000
0056</FONT></DIV>
<DIV><FONT size=2> 00111000 0056...... -> infinite ^_^ </FONT></DIV>
<DIV><FONT size=2>(because of my infinite loop..)</FONT></DIV>
<DIV> </DIV>
<DIV>Anyway it's ok.</DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>0056*0.4 = 22.4 -> real temperature value.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Consequently, I would like to see not infinite these
values </FONT></DIV>
<DIV><FONT size=2>but temperature value only with constant interval(every
10sec).</FONT></DIV>
<DIV> </DIV>
<DIV>For example, Temp:25'c</DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>What can I do?</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>This is an inserted code in httped.c sample</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT size=2>static int ShowTemper(NUTDEVICE *sostream, REQUEST
*req)<BR>{<BR> unsigned char ADC_F7;<BR>
int stat = -1;<BR> outp(0xff, DDRD);<BR>
outp(0x07, ADMUX);<BR>
<BR> NutHttpSendHeaderTop(sostream, req, 200,
"Ok");<BR> NutHttpSendHeaderBot(sostream, "text/html",
-1);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> NutPrintString_P(sostream,
PSTR("<HTML>"<BR>
"<HEAD>"<BR>
"<TITLE>Show
Temper</TITLE>"<BR>
"</HEAD>"<BR>
"<BODY>"));</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>for(;;)<BR>{<BR>outp(0xc6, ADCSR);<BR>ADC_F7 =
(inp(ADCL)>>2);<BR>ADC_F7 = (inp(ADCH)<<6) | ADC_F7;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>outp(ADC_F7, PORTD);<BR>stat =
inp(PIND);<BR>NutPrintInteger(sostream, stat, 2, 8,
FMTFLG_ZERO);<BR>NutPrintString(sostream,
"\r\n");<BR>NutPrintInteger(sostream, stat, 10, 4,
FMTFLG_ZERO);<BR>NutPrintString(sostream,
"\r\n");<BR>}<BR>NutPrintString(sostream, "None");<BR>
NutPrintString(sostream,
"</BODY>"<BR>
"</HTML>");<BR> NutPrintFlush(sostream);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> return 0;</FONT></DIV>
<DIV> </DIV></FONT></FONT></DIV></BLOCKQUOTE></BODY></HTML>