User manual

myEthernet Technische Beschreibung / technical description 27/48
www.myAVR.de © Laser & Co. Solutions GmbH – 06/2009 www.myAVR.com
5.1.2 Darstellen von Pin-Zuständen
Wie kann jetzt festgestellt werden, ob eine LED bereits
leuchtet? Weiterführend zum Verwenden von Komman-
dos gibt es noch die Ersetzungen. Eine Ersetzung ist da-
bei eine Zeichenkette innerhalb einer htm-Datei im For-
mat: °<
Typ><Pin-Nr.
Liste der Typen:
c … aktuelle Konfiguration (hexadezimale Ausgabe)
C … alle möglichen Konfigurationen (hexadezimale
Ausgabe)
v … aktueller Wert am Pin
Diese Zeichenkette wird bei jedem Aufruf der Webseite im
Webserver verarbeitet und durch einen Rückgabewert
ersetzt.
Für das Beispiel der Status-LED sind die Zeichenketten
°v20° und °v21° interessant. Beide geben den
aktuellen Ausgabewert am Pin 20 und 21 aus. Damit kann
erkannt werden, ob die grüne und rote LED leuchtet oder
nicht. Die Ausgabe der Werte an diesen Pins erfolgt
digital, was bedeutet, dass entweder 0 (aus) oder 1 (an)
als Ergebnis zu erwarten ist.
Der folgende HTML-Code stellt den aktuellen Zustand der
Status-LEDs dar:
5.1.2 Displaying of pin states
How can I check if a LED lights? There are also replace-
ments. One replacement is a string in a htm file in the for-
mat:
°<Typ><Pin-Nr
List of the types:
c ... actually configuration (hexadecimal output)
C … all configurations which are possible
(hexadecimal output)
v … actually value on the pin
This string is processed and replaced through a return
value by every calling the website.
The strings °v20° and °v21° are interessting for this
example. Both give the current output value on pin 20 and
21. So you can be detected if the green or red LED lights
or not. The output on the pins is digital. It means that 0 (off)
or 1 (on) is to be expected as a result.
The following html code shows the actually status of the
status LEDs:
<
html
>
<
body
>
Grüne LED an PIN20 = °v20°<
br>
Rote LED an PIN21 = °v21°<
br>
</
body
>
</
html
>
5.1.3 Interaktive Webseite
Abschließend soll es noch möglich sein, die beiden LEDs
an- und auszuschalten. Dazu werden zwei Hyperlinks auf
einer Webseite dargestellt, die beim Klicken die jeweilige
LED an- oder ausschalten.
5.1.3 Interactive website
At last it should be possible to switch the LEDs on and off.
For that two hyperlinks are displayed on the website which
switch the LED on or off by clicking on them.