<?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>kevin&#039;s blog</title>
	<atom:link href="http://blog.kevin-k.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.kevin-k.com</link>
	<description>just another blog from just another blogger.</description>
	<lastBuildDate>Fri, 03 Feb 2012 23:01:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Vorwiderstand für LEDs berechnen</title>
		<link>http://blog.kevin-k.com/2012-02-03/vorwiderstand-fur-leds-berechnen.html</link>
		<comments>http://blog.kevin-k.com/2012-02-03/vorwiderstand-fur-leds-berechnen.html#comments</comments>
		<pubDate>Fri, 03 Feb 2012 22:18:15 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Elektronik]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=1230</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://ledhacker.blogspot.com/p/led-resistor-calculator.html"><img src="http://blog.kevin-k.com/wp-content/uploads/2012/02/resistor-calculator.png" alt="resistor calculator Vorwiderstand für LEDs berechnen" title="LED Resistor Calculator" width="588" height="301" class="alignright size-full wp-image-1231" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2012-02-03/vorwiderstand-fur-leds-berechnen.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buffalo Linkstation: Controlling LEDs with microapl</title>
		<link>http://blog.kevin-k.com/2012-01-14/buffalo-linkstation-controlling-leds-with-microapl.html</link>
		<comments>http://blog.kevin-k.com/2012-01-14/buffalo-linkstation-controlling-leds-with-microapl.html#comments</comments>
		<pubDate>Sat, 14 Jan 2012 11:36:38 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=1195</guid>
		<description><![CDATA[microapl is a wrapper script for micro_evtd, which passes the corresponding hexadecimal value for setting different values of your buffalo linkstation. In my case, debian squeeze was installed onto a Buffalo LS-Pro v1. There are two types of controlling the leds: With &#8220;mcon&#8221;, the leds are controlled by the linkstation. With &#8220;cpu&#8221;, you can set [...]]]></description>
			<content:encoded><![CDATA[<p>microapl is a wrapper script for micro_evtd, which passes the corresponding hexadecimal value for setting different values of your buffalo linkstation. In my case, <a href="http://buffalo.nas-central.org/wiki/Install_Debian_on_the_Linkstation_Pro/Live">debian squeeze</a> was installed onto a Buffalo LS-Pro v1.</p>
<p>There are two types of controlling the leds: With &#8220;mcon&#8221;, the leds are controlled by the linkstation. With &#8220;cpu&#8221;, you can set the leds by yourself.</p>
<p>To get all possible settings, type in:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>box:~ microapl
option: boot_start
boot_end
power_off
shutdown_wait
shutdown_cancel
skip_standby
delay_standby
standby
reboot
temp_get
fan_set_speed <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
fan_get_speed
bz_on <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
bz_set_freq <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
bz_melody tempo note ...
bz_imhere tempo note ...
int_get_switch_status <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
led_set_bright <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
led_set_cpu_mcon <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
led_set_on_off <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
led_set_blink <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
led_set_code_error <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
led_set_code_information <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
led_set_cpu_mcon <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
mcon_get_status
hdd_set_power <span style="color: #7a0874; font-weight: bold;">&#91;</span>arg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
mcon_get_version</pre></div></div>

<p>As you see, you can do many cool stuff, for example play a melody with bz_melody, or set and get the fan speed. Just try out.</p>
<p>To get the current controlling type of the leds (cpu or mcon), type in:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>box:~ microapl <span style="color: #660033;">-a</span> led_set_cpu_mcon
<span style="color: #666666; font-style: italic;">#[microapl.led_set_cpu_mcon]</span>
<span style="color: #007800;">led_power</span>=mcon
<span style="color: #007800;">led_info</span>=mcon
<span style="color: #007800;">led_diag</span>=mcon
<span style="color: #007800;">led_link</span>=mcon</pre></div></div>

<p>If you want to change the diag-led (error, red) by yourself, set the the led_diag value to &#8220;cpu&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>box:~ microapl <span style="color: #660033;">-a</span> led_set_cpu_mcon diag
root<span style="color: #000000; font-weight: bold;">@</span>box:~ microapl <span style="color: #660033;">-a</span> led_set_cpu_mcon
<span style="color: #666666; font-style: italic;">#[microapl.led_set_cpu_mcon]</span>
<span style="color: #007800;">led_power</span>=mcon
<span style="color: #007800;">led_info</span>=mcon
<span style="color: #007800;">led_diag</span>=cpu
<span style="color: #007800;">led_link</span>=mcon</pre></div></div>

<p>Now the value of led_diag is changed changed to &#8220;cpu&#8221;. To light up the diag-led, type in:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>box:~ microapl <span style="color: #660033;">-a</span> led_set_on_off diag
root<span style="color: #000000; font-weight: bold;">@</span>box:~ microapl <span style="color: #660033;">-a</span> led_set_on_off
<span style="color: #666666; font-style: italic;">#[microapl.led_set_on_off]</span>
<span style="color: #007800;">led_power</span>=off
<span style="color: #007800;">led_info</span>=off
<span style="color: #007800;">led_diag</span>=on
<span style="color: #007800;">led_link</span>=off</pre></div></div>

<p>To change the power, link, info and diag led to cpu and light them up, type in:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>box:~ microapl <span style="color: #660033;">-a</span> led_set_cpu_mcon power info diag <span style="color: #c20cb9; font-weight: bold;">link</span>
root<span style="color: #000000; font-weight: bold;">@</span>box:~ microapl <span style="color: #660033;">-a</span> led_set_on_off power info diag <span style="color: #c20cb9; font-weight: bold;">link</span></pre></div></div>

<p>To change everything back to mcon (default), just use &#8220;off&#8221; as parameter:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>box:~ microapl <span style="color: #660033;">-a</span> led_set_cpu_mcon off</pre></div></div>

<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2012-01-14/buffalo-linkstation-controlling-leds-with-microapl.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RS232 zwischen Python and Arduino</title>
		<link>http://blog.kevin-k.com/2012-01-06/rs232-zwischen-python-and-arduino.html</link>
		<comments>http://blog.kevin-k.com/2012-01-06/rs232-zwischen-python-and-arduino.html#comments</comments>
		<pubDate>Fri, 06 Jan 2012 13:39:29 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Elektronik]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=1176</guid>
		<description><![CDATA[Für ein kleines Projekt möchte ich unter Python Werte vom Arduino darstellen. In Python nutze ich hierbei das pyserial Modul, welches plattformunabhängig sehr einfach eine serielle Verbindung aufbaut. Unter Python wird eine Anfrage gestellt, die der Arduino mit Werten definierter Größe beantwortet. Unter Arduino werden die Werte je nach Größe mit den Funktionen serial_uint8 bis [...]]]></description>
			<content:encoded><![CDATA[<p>Für ein kleines Projekt möchte ich unter Python Werte vom Arduino darstellen. In Python nutze ich hierbei das pyserial Modul, welches plattformunabhängig sehr einfach eine serielle Verbindung aufbaut.</p>
<p>Unter Python wird eine Anfrage gestellt, die der Arduino mit Werten definierter Größe beantwortet. Unter Arduino werden die Werte je nach Größe mit den Funktionen serial_uint8 bis serial_uint32 in einzelne Bytes (little-endian) geteilt. Auf der Gegenseite unter Python wird mit dem struct-Modul das Bytearray nach einer vorgegebenem Format wieder in einzelne Bytes entteilt.</p>
<p>Die Python Struct-Formate findet man <a href="http://docs.python.org/library/struct.html#format-characters" target="_blank">hier</a>. Die PySerial Dokumentation gibt es <a href="http://pyserial.sourceforge.net/" target="_blank">hier</a>.</p>
<p>Python-Code:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> serial
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">time</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">struct</span>
&nbsp;
<span style="color: #483d8b;">&quot;&quot;&quot; setup serial for arduino &quot;&quot;&quot;</span>
ser = serial.<span style="color: black;">Serial</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
ser.<span style="color: black;">port</span> = <span style="color: #ff4500;">2</span>
ser.<span style="color: black;">baudrate</span> = <span style="color: #ff4500;">9600</span>
&nbsp;
<span style="color: #483d8b;">&quot;&quot;&quot; open serial port &quot;&quot;&quot;</span>
ser.<span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #ff4500;">1</span>:
&nbsp;
    <span style="color: #483d8b;">&quot;&quot;&quot; request values from arduino &quot;&quot;&quot;</span>    
    ser.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;s&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #483d8b;">&quot;&quot;&quot; wait until all bytes were read &quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">while</span> ser.<span style="color: black;">inWaiting</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">!</span>= <span style="color: #ff4500;">0</span>:
&nbsp;
        <span style="color: #483d8b;">&quot;&quot;&quot; unpack format, little endian &quot;&quot;&quot;</span>
        unpack_fmt = <span style="color: #483d8b;">&quot;&lt;BLbHHHH&quot;</span>
&nbsp;
        <span style="color: #483d8b;">&quot;&quot;&quot; read bytes as described in unpack_fmt &quot;&quot;&quot;</span>
        val = ser.<span style="color: black;">read</span><span style="color: black;">&#40;</span>size=<span style="color: #dc143c;">struct</span>.<span style="color: black;">calcsize</span><span style="color: black;">&#40;</span>unpack_fmt<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #483d8b;">&quot;&quot;&quot; display values &quot;&quot;&quot;</span>
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #dc143c;">struct</span>.<span style="color: black;">unpack</span><span style="color: black;">&#40;</span>unpack_fmt, val<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Arduino-Code:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  Serial.<span style="color: #202020;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">9600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">uint8_t</span> serial_buffer<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">128</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #993333;">uint8_t</span> serial_buffer_pos <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">void</span> serial_uint8<span style="color: #009900;">&#40;</span><span style="color: #993333;">uint8_t</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  serial_buffer<span style="color: #009900;">&#91;</span>serial_buffer_pos<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>val <span style="color: #339933;">&amp;</span> <span style="color: #208080;">0xFF</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> serial_uint16<span style="color: #009900;">&#40;</span><span style="color: #993333;">uint16_t</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  serial_buffer<span style="color: #009900;">&#91;</span>serial_buffer_pos<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>val <span style="color: #339933;">&amp;</span> <span style="color: #208080;">0xFF</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  serial_buffer<span style="color: #009900;">&#91;</span>serial_buffer_pos<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>val <span style="color: #339933;">&gt;&gt;</span> <span style="color: #0000dd;">8</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span> <span style="color: #208080;">0xFF</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> serial_uint32<span style="color: #009900;">&#40;</span><span style="color: #993333;">uint32_t</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  serial_buffer<span style="color: #009900;">&#91;</span>serial_buffer_pos<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>val <span style="color: #339933;">&amp;</span> <span style="color: #208080;">0xFF</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  serial_buffer<span style="color: #009900;">&#91;</span>serial_buffer_pos<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>val <span style="color: #339933;">&gt;&gt;</span> <span style="color: #0000dd;">8</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span> <span style="color: #208080;">0xFF</span><span style="color: #339933;">;</span>
  serial_buffer<span style="color: #009900;">&#91;</span>serial_buffer_pos<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>val <span style="color: #339933;">&gt;&gt;</span> <span style="color: #0000dd;">16</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span> <span style="color: #208080;">0xFF</span><span style="color: #339933;">;</span>
  serial_buffer<span style="color: #009900;">&#91;</span>serial_buffer_pos<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>val <span style="color: #339933;">&gt;&gt;</span> <span style="color: #0000dd;">24</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span> <span style="color: #208080;">0xFF</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> serial_init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  serial_buffer_pos <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> serial_send<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> serial_buffer_pos<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    Serial.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>serial_buffer<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">int</span> readByte <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>Serial.<span style="color: #202020;">available</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    readByte <span style="color: #339933;">=</span> Serial.<span style="color: #202020;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span>readByte<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'s'</span><span style="color: #339933;">:</span>
        serial_init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_uint8<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_uint32<span style="color: #009900;">&#40;</span>millis<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_uint8<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_uint16<span style="color: #009900;">&#40;</span>random<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">8</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">2200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_uint16<span style="color: #009900;">&#40;</span>random<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">8</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">2200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_uint16<span style="color: #009900;">&#40;</span>random<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">8</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">2200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_uint16<span style="color: #009900;">&#40;</span>random<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">8</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">2200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_send<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'r'</span><span style="color: #339933;">:</span>
        serial_init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_uint8<span style="color: #009900;">&#40;</span>random<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">250</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        serial_send<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Das Ergebis sieht so aus:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1375424</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1463</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">927</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1220</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">715</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1376425</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">663</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1552</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">470</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">308</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1377426</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">923</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">711</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1963</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">571</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1378427</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">732</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1259</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">618</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1629</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1379428</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1493</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">378</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">396</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">80</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1380429</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1115</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">753</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">409</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1894</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1381431</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1968</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1328</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">287</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">413</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1382431</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">135</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1310</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1237</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">823</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1383433</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">794</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1352</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1923</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">439</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1384433</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">100</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">550</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">632</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">116</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">175</span><span style="color: #009900;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2012-01-06/rs232-zwischen-python-and-arduino.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Split 2-byte integer into two single bytes</title>
		<link>http://blog.kevin-k.com/2012-01-04/split-2-byte-integer-into-two-single-bytes.html</link>
		<comments>http://blog.kevin-k.com/2012-01-04/split-2-byte-integer-into-two-single-bytes.html#comments</comments>
		<pubDate>Wed, 04 Jan 2012 20:22:41 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Entwicklung]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=1170</guid>
		<description><![CDATA[Python: &#34;&#34;&#34; two byte integer &#34;&#34;&#34; val = 42131 # bin: 1010 0100 1001 0011 hex: 0xa493 print hex&#40;val&#41; &#160; byte1 = val &#38; 0xFF # first 8 bit byte2 = &#40;val &#62;&#62; 8&#41; &#38; 0xFF # last 8 bit &#160; print &#34;byte1: &#34; + hex&#40;byte1&#41; # result: 0x93 print &#34;byte2: &#34; + hex&#40;byte2&#41; # [...]]]></description>
			<content:encoded><![CDATA[<p>Python:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #483d8b;">&quot;&quot;&quot; two byte integer &quot;&quot;&quot;</span>
val = <span style="color: #ff4500;">42131</span> <span style="color: #808080; font-style: italic;"># bin: 1010 0100 1001 0011 hex: 0xa493</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #008000;">hex</span><span style="color: black;">&#40;</span>val<span style="color: black;">&#41;</span>
&nbsp;
byte1 = val <span style="color: #66cc66;">&amp;</span> 0xFF <span style="color: #808080; font-style: italic;"># first 8 bit</span>
byte2 = <span style="color: black;">&#40;</span>val <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #ff4500;">8</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&amp;</span> 0xFF <span style="color: #808080; font-style: italic;"># last 8 bit</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;byte1: &quot;</span> + <span style="color: #008000;">hex</span><span style="color: black;">&#40;</span>byte1<span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># result: 0x93</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;byte2: &quot;</span> + <span style="color: #008000;">hex</span><span style="color: black;">&#40;</span>byte2<span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># result: 0xa4</span>
&nbsp;
<span style="color: #483d8b;">&quot;&quot;&quot; merge two bytes into 2-byte integer &quot;&quot;&quot;</span>
val_m  = <span style="color: black;">&#40;</span>byte1 <span style="color: #66cc66;">&amp;</span> 0xFF<span style="color: black;">&#41;</span>
val_m |= <span style="color: black;">&#40;</span>byte2 <span style="color: #66cc66;">&amp;</span> 0xFF<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #ff4500;">8</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #008000;">hex</span><span style="color: black;">&#40;</span>val_m<span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># result: 0xa493</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2012-01-04/split-2-byte-integer-into-two-single-bytes.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vom Breadboard zur Platine</title>
		<link>http://blog.kevin-k.com/2011-12-04/vom-breadboard-zur-platine.html</link>
		<comments>http://blog.kevin-k.com/2011-12-04/vom-breadboard-zur-platine.html#comments</comments>
		<pubDate>Sun, 04 Dec 2011 22:56:37 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Elektronik]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=1134</guid>
		<description><![CDATA[Nach mehreren Wochen Experimentierens konnte ich nun meine erste Platine mit Hilfe des Toner-Transferverfahrens fertigstellen. Dabei nimmt man einen Laser-Drucker (günstig von eBay, z.b. HP Laserjet 1010) und druckt sein Layout auf ein geeignetes Papier (Reicheltkatalogpapier eignet sich dafür). Danach überträgt man den Toner mittels Bügeleiesen oder Laminiermaschine auf die Kupferschicht der Platine (vorher mit [...]]]></description>
			<content:encoded><![CDATA[<p>Nach mehreren Wochen Experimentierens konnte ich nun meine erste Platine mit Hilfe des Toner-Transferverfahrens fertigstellen. Dabei nimmt man einen Laser-Drucker (günstig von eBay, z.b. HP Laserjet 1010) und druckt sein Layout auf ein geeignetes Papier (Reicheltkatalogpapier eignet sich dafür). Danach überträgt man den Toner mittels Bügeleiesen oder Laminiermaschine auf die Kupferschicht der Platine (vorher mit Aceton reinigen). Spülwasser und ein wenig rubbeln erledigen den Rest, danach ist der Toner fast krazfest auf der Platine und kann geätzt werden.</p>
<p>Meine Platine für den diesjährigen Pyro-Fernzünder Empfänger hat relativ gut geklappt (nach dem dritten Anlauf):<br />
<a href="http://blog.kevin-k.com/wp-content/uploads/2011/12/DSC00050.jpg"><img src="http://blog.kevin-k.com/wp-content/uploads/2011/12/DSC00050-575x431.jpg" alt="DSC00050 575x431 Vom Breadboard zur Platine" title="DSC00050" width="575" height="431" class="alignright size-medium wp-image-1152" /></a><br />
<a href="http://blog.kevin-k.com/wp-content/uploads/2011/12/DSC00049.jpg"><img src="http://blog.kevin-k.com/wp-content/uploads/2011/12/DSC00049-575x431.jpg" alt="DSC00049 575x431 Vom Breadboard zur Platine" title="DSC00049" width="575" height="431" class="alignright size-medium wp-image-1151" /></a></p>
<p>Darauf befindet sich ein Atmega 328 mit Arduino Bootloader, ein MAX232 für die Kommunikation mit einem Handy, ein 434Mhz Funkmodul und ein ULN2803A als Relaistreiber. Auf dem Foto sehen die Leiterbahnen leicht unterbrochen aus, sind aber sehr durchgängig und mit einer breite von 36mil auch relativ groß. Zum Schutz sind die Leiterbahnen mit Plastik 70 Isolierlack besprüht. Die Bohrlöcher konnte ich mit einer großen Ständerbohrmaschine problemfrei mit 0,8mm und 1mm bohren.</p>
<p>Zwei kleine Fehler im Layout konnte ich durch ein Kabel am Boden und einer Drahtbrücke fixen. Nur hat blöder weiße die Maße des RF-Moduls von Sparkfun nicht gepasst, so dass ich den Antennen Pin verbiegen mußte. Aber immerhin klappt nun alles und Silvester kann kommen :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2011-12-04/vom-breadboard-zur-platine.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nokia 6210 mit DLR-3p an Arduino / ATMega</title>
		<link>http://blog.kevin-k.com/2011-11-09/nokia-6210-mit-dlr-3p-an-arduino-atmega.html</link>
		<comments>http://blog.kevin-k.com/2011-11-09/nokia-6210-mit-dlr-3p-an-arduino-atmega.html#comments</comments>
		<pubDate>Wed, 09 Nov 2011 21:52:17 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=1127</guid>
		<description><![CDATA[Nach nun über 3 Stunden habe ich es endlich geschafft mein Nokia 6210 über ein DLR-3p Datenkabel (original mit FBus auf RS232-Konverter) durch einen MAX232N IC mit meinem Arduino sprechen zu lassen. Hier erstmal die Eagle-Schematik: Benötigt wird: 1x MAX232 4x 10uF Elkos (sollte zwischen 1uF bis 22uF passen -> Datenblatt des jeweiligen ICs) 1x [...]]]></description>
			<content:encoded><![CDATA[<p>Nach nun über 3 Stunden habe ich es endlich geschafft mein Nokia 6210 über ein DLR-3p Datenkabel (original mit FBus auf RS232-Konverter) durch einen MAX232N IC mit meinem Arduino sprechen zu lassen. Hier erstmal die Eagle-Schematik:<br />
<a href="http://blog.kevin-k.com/wp-content/uploads/2011/11/max232n.png"><img src="http://blog.kevin-k.com/wp-content/uploads/2011/11/max232n-575x264.png" alt="max232n 575x264 Nokia 6210 mit DLR 3p an Arduino / ATMega" title="max232n" width="575" height="264" class="alignright size-medium wp-image-1145" /></a></p>
<p>Benötigt wird:<br />
1x MAX232<br />
4x 10uF Elkos (sollte zwischen 1uF bis 22uF passen -> Datenblatt des jeweiligen ICs)<br />
1x 100nF Keramikkondensator als ByPass<br />
1x Male D-Sub9 Stecker</p>
<p>Nach einigen erfolglosen Anläufen hat mir <a href="http://www.dbzoo.com/atmel/smsrx#avrdlr-3_cable" target="_blank">dbzoo</a> die Lösung gegeben: Beim D-Sub9 Stecker muss Pin 4 (DTR) auf VCC, damit der Arduino vom Datenkabel als DCE gesehen wird, da er sonst nicht will.<br />
<strng>Edit:</strong> Man muss auch noch Pin 7 (RTS) auf VCC legen, dann empfängt man auch RX.</p>
<p>Zum testen habe ich folgendes einfaches Programm, welches mittels AT-Befehle ein Telefonat aufbaut:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  Serial.<span style="color: #202020;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">9600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  Serial.<span style="color: #202020;">println</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;AT&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #202020;">println</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;ATD0711123123&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">5000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><a href="http://blog.kevin-k.com/wp-content/uploads/2011/11/DSC00025.jpg"><img src="http://blog.kevin-k.com/wp-content/uploads/2011/11/DSC00025-575x431.jpg" alt="DSC00025 575x431 Nokia 6210 mit DLR 3p an Arduino / ATMega" title="DSC00025" width="575" height="431" class="alignright size-medium wp-image-1142" /></a><br />
<a href="http://blog.kevin-k.com/wp-content/uploads/2011/11/DSC00020.jpg"><img src="http://blog.kevin-k.com/wp-content/uploads/2011/11/DSC00020-575x431.jpg" alt="DSC00020 575x431 Nokia 6210 mit DLR 3p an Arduino / ATMega" title="DSC00020" width="575" height="431" class="alignright size-medium wp-image-1141" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2011-11-09/nokia-6210-mit-dlr-3p-an-arduino-atmega.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django und UUID Primary Keys</title>
		<link>http://blog.kevin-k.com/2011-09-13/django-und-uuid-primary-keys.html</link>
		<comments>http://blog.kevin-k.com/2011-09-13/django-und-uuid-primary-keys.html#comments</comments>
		<pubDate>Tue, 13 Sep 2011 20:55:35 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=1120</guid>
		<description><![CDATA[Mit den Django Extensions lassen sich in den Modellen sehr einfach UUIDs anstelle der üblichen Autoincrement IDs nutzen. Unter Debian installiert man hierzu das Paket python-django-extensions: apt-get install python-django-extensions Danach fügt man in seiner settings.py das Paket hinzu: INSTALLED_APPS = &#40; ... 'django_extensions', &#41; Die myapp/models.py kann nun wie folgt aussehen: from django.db import models [...]]]></description>
			<content:encoded><![CDATA[<p>Mit den Django Extensions lassen sich in den Modellen sehr einfach UUIDs anstelle der üblichen Autoincrement IDs nutzen.</p>
<p>Unter Debian installiert man hierzu das Paket <em>python-django-extensions:</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> python-django-extensions</pre></div></div>

<p>Danach fügt man in seiner <em>settings.py</em> das Paket hinzu:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">INSTALLED_APPS = <span style="color: black;">&#40;</span>
    ...
    <span style="color: #483d8b;">'django_extensions'</span>,
<span style="color: black;">&#41;</span></pre></div></div>

<p>Die <em>myapp/models.py</em> kann nun wie folgt aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">db</span> <span style="color: #ff7700;font-weight:bold;">import</span> models
<span style="color: #ff7700;font-weight:bold;">from</span> django_extensions.<span style="color: black;">db</span> <span style="color: #ff7700;font-weight:bold;">import</span> fields <span style="color: #ff7700;font-weight:bold;">as</span> exfields
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> List<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    <span style="color: #008000;">id</span> = exfields.<span style="color: black;">UUIDField</span><span style="color: black;">&#40;</span>primary_key=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
    name = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'name of list'</span>, max_length=<span style="color: #ff4500;">200</span><span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2011-09-13/django-und-uuid-primary-keys.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Alternativer Titel als in Navigation</title>
		<link>http://blog.kevin-k.com/2011-07-23/wordpress-alternativer-titel-als-in-navigation.html</link>
		<comments>http://blog.kevin-k.com/2011-07-23/wordpress-alternativer-titel-als-in-navigation.html#comments</comments>
		<pubDate>Sat, 23 Jul 2011 08:13:29 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=1071</guid>
		<description><![CDATA[Wer einen alternativen Titel auf WordPress-Seiten haben möchte, kann sich folgendem Hack bedienen: &#60;h2&#62;&#60;?php $custom = get_post_custom&#40;&#41;; echo &#40;array_key_exists&#40;&#34;title&#34;, $custom&#41;&#41; ? $custom&#91;&#34;title&#34;&#93;&#91;0&#93; : the_title&#40;&#41;; ?&#62;&#60;/h2&#62; Diese Änderung in der index.php, single.php und page.php durch folgenden vorhandenen Teil ersetzen: &#60;h2&#62;&#60;?php the_title&#40;&#41;; ?&#62;&#60;/h2&#62; Standardmäßig nutzt WordPress für den Titel und Navigationslink den selben Text. Mit diesem kleinem, [...]]]></description>
			<content:encoded><![CDATA[<p>Wer einen alternativen Titel auf WordPress-Seiten haben möchte, kann sich folgendem Hack bedienen:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$custom</span> <span style="color: #339933;">=</span> get_post_custom<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$custom</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$custom</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h2&gt;</pre></div></div>

<p>Diese Änderung in der <em>index.php</em>, <em>single.php</em> und <em>page.php</em> durch folgenden vorhandenen Teil ersetzen:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h2&gt;</pre></div></div>

<p>Standardmäßig nutzt WordPress für den Titel und Navigationslink den selben Text. Mit diesem kleinem, handlichen Hack lassen sich nun alternative Titel über ein benutzerdefiniertes Feld mit dem Wert &#8220;title&#8221; anzeigen. Zusammen mit All-in-One-Seo, welches zusätzlich den Title im Header ändern kann, hat man jegliche Titel-Freiheit.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2011-07-23/wordpress-alternativer-titel-als-in-navigation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation VMWare Tools auf Debian Squeeze (6)</title>
		<link>http://blog.kevin-k.com/2011-07-03/installation-vmware-tools-auf-debian-squeeze-6.html</link>
		<comments>http://blog.kevin-k.com/2011-07-03/installation-vmware-tools-auf-debian-squeeze-6.html#comments</comments>
		<pubDate>Sun, 03 Jul 2011 11:33:54 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualisierung]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=1000</guid>
		<description><![CDATA[apt-get install linux-headers-$(uname -r) gcc make tar xfzv VMwareTools-8.3.7-341836.tar.gz ./vmware-tools-distrib/vmware-install.pl]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="code" style="font-family:monospace;">apt-get install linux-headers-$(uname -r) gcc make
tar xfzv VMwareTools-8.3.7-341836.tar.gz
./vmware-tools-distrib/vmware-install.pl</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2011-07-03/installation-vmware-tools-auf-debian-squeeze-6.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Das echte kubanische Mojito-Rezept</title>
		<link>http://blog.kevin-k.com/2011-04-16/das-echte-kubanische-mojito-rezept.html</link>
		<comments>http://blog.kevin-k.com/2011-04-16/das-echte-kubanische-mojito-rezept.html#comments</comments>
		<pubDate>Sat, 16 Apr 2011 07:06:49 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Rezept]]></category>

		<guid isPermaLink="false">http://blog.kevin-k.com/?p=991</guid>
		<description><![CDATA[Nach einigen Rezepten wie man den originalen Mojito herstellt, fand ich das *echt kubanische Mojito-Rezept* auf der Havana Club Website in Form eines Videos. Nach dem uns der Türsteher hereinlässt, verät uns der Barkeeper das Rezept: 2 Teelöffel Zucker in ein Glas geben Saft einer 1/2 Limette (genügend, um den Zucker zu bedecken) 2 frische [...]]]></description>
			<content:encoded><![CDATA[<p>Nach einigen Rezepten wie man den originalen Mojito herstellt, fand ich das *echt kubanische Mojito-Rezept* auf der Havana Club Website in Form eines Videos. Nach dem uns der Türsteher hereinlässt, verät uns der Barkeeper das Rezept:</p>
<ul>
<li>2 Teelöffel Zucker in ein Glas geben</li>
<li>Saft einer 1/2 Limette (genügend, um den Zucker zu bedecken)</li>
<li>2 frische Minzezweige und</li>
<li>9cl Mineralswasser hinzugeben</li>
<li>Alles gut mischen (mit dem Stößel)</li>
<li>4,5cl Havana Club 3 Jahre</li>
<li>4 Eiswürfel dazu geben</li>
<li>Gut umrühren</li>
</ul>
<p>Wie man sieht, kommt anstelle des mir bekannten Rezeptes kein Rohrzucker und keine ganzen Limettenstücke rein. Aber am wichtigsten ist natürlich die frische Minze, welche am besten frisch vom Garten kommt. Die originale Hemminwayminze ist die <strong>Mentha species &#8216;Nemorosa&#8217;</strong>, es gehen aber auch andere Minzen wie z.b. die Grüne Minze.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevin-k.com/2011-04-16/das-echte-kubanische-mojito-rezept.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

