<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>zeflo</title>
	<atom:link href="http://zeflo.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://zeflo.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 May 2012 14:36:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>AvrNET</title>
		<link>http://zeflo.com/2012/avrnet/</link>
		<comments>http://zeflo.com/2012/avrnet/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 14:29:46 +0000</pubDate>
		<dc:creator>zeflo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zeflo.com/?p=118</guid>
		<description><![CDATA[Arbeite gerade an einem kleinen Projekt um mehr über TCP/IP und Mikrocontroller zu lernen. Dabei handelt es sich um eine art Arduino, nur mit Ethernet-Interface.]]></description>
			<content:encoded><![CDATA[<p><a href="http://zeflo.com/wp-content/uploads/2012/05/Bildschirmfoto.png"><img class="alignnone size-medium wp-image-119" title="Bildschirmfoto" src="http://zeflo.com/wp-content/uploads/2012/05/Bildschirmfoto-569x276.png" alt="" width="569" height="276" /></a></p>
<p>Arbeite gerade an einem kleinen Projekt um mehr über TCP/IP und Mikrocontroller zu lernen. Dabei handelt es sich um eine art Arduino, nur mit Ethernet-Interface.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeflo.com/2012/avrnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Atmega Slim Client &#8211; Hardware Rev A</title>
		<link>http://zeflo.com/2012/atmega-slim-client-hardware-rev-a/</link>
		<comments>http://zeflo.com/2012/atmega-slim-client-hardware-rev-a/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 14:24:15 +0000</pubDate>
		<dc:creator>zeflo</dc:creator>
				<category><![CDATA[elektronik]]></category>

		<guid isPermaLink="false">http://zeflo.com/?p=112</guid>
		<description><![CDATA[Hier mal ein Fotot meines aktuellen Projekts. Dabei handelt es sich eigentlich nur um einen ChipBasic2 mit Ethernet. Leider haben sich ein paar Fehler in das Design der ersten Version eingeschlichen. Trotzdem funktioniert die Software von Jörg Wolfram schon super. &#160;]]></description>
			<content:encoded><![CDATA[<p><a href="http://zeflo.com/wp-content/uploads/2012/03/slim_client_reva.jpg"><img class="alignnone size-medium wp-image-111" title="slim_client_reva" src="http://zeflo.com/wp-content/uploads/2012/03/slim_client_reva-569x471.jpg" alt="" width="569" height="471" /></a></p>
<p>Hier mal ein Fotot meines aktuellen Projekts. Dabei handelt es sich eigentlich nur um einen <a href="http://www.jcwolfram.de/projekte/avr/chipbasic2/main.php">ChipBasic2</a> mit Ethernet. Leider haben sich ein paar Fehler in das Design der <a href="/projects/slimclient/slimclient-rev-a.7z">ersten</a> Version eingeschlichen. Trotzdem funktioniert die Software von Jörg Wolfram schon super.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zeflo.com/2012/atmega-slim-client-hardware-rev-a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fallblattanzeigen Sprite Generator</title>
		<link>http://zeflo.com/2012/fallblattanzeigen-sprite-generator/</link>
		<comments>http://zeflo.com/2012/fallblattanzeigen-sprite-generator/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 23:13:46 +0000</pubDate>
		<dc:creator>zeflo</dc:creator>
				<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://zeflo.com/?p=97</guid>
		<description><![CDATA[Um die Sprites für die Fallblattanzeige zu generieren habe ich ein Python-Script für Gimp geschrieben. Ich bin noch dabei den Code zu Kommentieren und werde es dann hier veröffentlichen. Das obige Sprite gibt es hier.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-100 aligncenter" title="carbon_flapdisplay" src="http://zeflo.com/wp-content/uploads/2012/03/carbon_flapdisplay.png" alt="" width="453" height="135" /></p>
<p>Um die Sprites für die <a href="/2012/einfache-fallblattanzeige-mit-javascript/">Fallblattanzeige</a> zu generieren habe ich ein Python-Script für <a href="http://www.gimp.org/">Gimp</a> geschrieben. Ich bin noch dabei den Code zu Kommentieren und werde es dann hier veröffentlichen. Das obige Sprite gibt es <a href="/projects/flapdisplay/carbon-countup-sprite.png">hier</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeflo.com/2012/fallblattanzeigen-sprite-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Einfache Fallblattanzeige mit Javascript</title>
		<link>http://zeflo.com/2012/einfache-fallblattanzeige-mit-javascript/</link>
		<comments>http://zeflo.com/2012/einfache-fallblattanzeige-mit-javascript/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 12:41:44 +0000</pubDate>
		<dc:creator>zeflo</dc:creator>
				<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://zeflo.com/?p=34</guid>
		<description><![CDATA[Fallblattanzeigen kennt man von Flughäfen und Bahnhöfen. Heute wollen wir eine solche anzeige für eine Webseite nachbauen. Um eine animierte Fallblattanzeige auf einer Webseite zu realisieren, bereiten wir zuerst die eigentliche Animation vor.  Aus der Länge der Animation und der &#8230; <a href="http://zeflo.com/2012/einfache-fallblattanzeige-mit-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Fallblattanzeigen kennt man von Flughäfen und Bahnhöfen. Heute wollen wir eine solche anzeige für eine Webseite nachbauen.<br />
<img src="http://zeflo.com/wp-content/uploads/2012/02/falltafelanzeige.png" alt="" title="falltafelanzeige" width="436" height="130" class="aligncenter size-full wp-image-87" /><br />
Um eine animierte Fallblattanzeige auf einer Webseite zu realisieren, bereiten wir zuerst die eigentliche Animation vor.  Aus der Länge der Animation und der Anzahl der Bilder pro Sekunde ergibt sich die Gesamtzahl der Bilder pro Animation. In diesem Beispiel besteht unsere Animation aus sieben Bildern. Um nicht jedes Bild einzeln vom Server laden zu müssen, packen wir alle Bilder in ein einziges Bild, in ein sogenanntes Image-Sprite. Ob wir die Bilder alle nebeneinander, untereinander packen oder sie in einer Matrix anordnen ist dabei egal. In diesem Beispiel hab ich sie in einer einzigen Spalte angeordnet.</p>
<p>Nun kommen wir zur eigentlichen Anzeige. Der HTML-Code den wir dafür brauchen ist sehr einfach gehalten.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;ul class=&quot;display&quot;&gt;
	&lt;li id=&quot;d0&quot;&gt;
	&lt;li id=&quot;d1&quot;&gt;
	&lt;li id=&quot;d2&quot;&gt;
	&lt;li id=&quot;d3&quot;&gt;
	&lt;li id=&quot;d4&quot;&gt;
&lt;/ul&gt;</pre></div></div>

<p>Unser Sprite wird als Hintergrundbild der einzelnen &lt;li&gt;-Elemente eingebunden. Damit diese nicht untereinander sondern nebeneinander und in der richtigen Größe angezeigt werden, brauchen wir noch ein paar Zeilen CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">display</span> li <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;simple-countup-sprite.png&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">90px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">122px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Der oben stehenden Code reicht schon für eine einfache statische Anzeige. In dem wir den einzelnen &lt;li&gt;-Elementen mittels dem &#8220;style&#8221;-Attribut die Position des Hintergrundbildes vorgeben, kann auch bei Browsern die kein Javascript unterstützen ein bestimmter unveränderlicher Wert angezeigt werden. Um jedoch eine animierte Anzeige zu erhalten brauchen wir noch etwas Javascript Unterstützung. Um komfortabel auf die css-Eigenschaften zuzugreifen, binden wir jQuery ein.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">setInterval</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;count()&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	<span style="color: #006600; font-style: italic;">// Counter Interval 1 Second</span>
<span style="color: #003366; font-weight: bold;">var</span> oldState <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> newState <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> frame <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> aniInterval <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> counter <span style="color: #339933;">=</span> <span style="color: #CC0000;">12343</span><span style="color: #339933;">;</span>			<span style="color: #006600; font-style: italic;">// Start Value</span>
<span style="color: #003366; font-weight: bold;">var</span> height <span style="color: #339933;">=</span> <span style="color: #CC0000;">122</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> count<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	counter<span style="color: #339933;">++;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>counter<span style="color: #339933;">&gt;</span><span style="color: #CC0000;">99999</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		counter<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	setDisplay<span style="color: #009900;">&#40;</span>counter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> animate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> digit<span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span><span style="color: #CC0000;">5</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>oldState<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">!=</span>newState<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			digit <span style="color: #339933;">=</span> newState<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>digit<span style="color: #339933;">==</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				digit <span style="color: #339933;">=</span> <span style="color: #CC0000;">10</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>frame<span style="color: #339933;">&gt;</span><span style="color: #CC0000;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				oldState<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> newState<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			pos <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">+</span>frame<span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>digit<span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #CC0000;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>height<span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#d&quot;</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;background-position&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;0 -&quot;</span><span style="color: #339933;">+</span>pos<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;px&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	frame<span style="color: #339933;">++;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>frame<span style="color: #339933;">&gt;</span><span style="color: #CC0000;">6</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		frame <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
		clearInterval<span style="color: #009900;">&#40;</span>aniInterval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		aniInterval <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>	
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Diese Anzeige hat noch einige Schwächen. So kann sie nicht schneller zählen als die Dauer der Animation. Es ist also noch viel Potential für Verbesserungen da.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeflo.com/2012/einfache-fallblattanzeige-mit-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

