<?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>Michael Fretz - Interaction Designer &#187; xml</title>
	<atom:link href="http://www.michaelfretz.com/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelfretz.com</link>
	<description>Interaction Design Studium Blog</description>
	<lastBuildDate>Sat, 25 Jun 2011 20:57:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Punkt.Fizen – Android and Arduino powered Bike Navigation</title>
		<link>http://www.michaelfretz.com/2011/01/03/punkt-fizen-android-and-arduino-powered-bike-navigation/</link>
		<comments>http://www.michaelfretz.com/2011/01/03/punkt-fizen-android-and-arduino-powered-bike-navigation/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 14:56:05 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[Studium]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3348</guid>
		<description><![CDATA[How does one orient oneself while biking, for example as a tourist? You certainly will read traffic signs, ask people for direction or use a tourist-map. But at least the last example will force you to stop the bike. How could we provide a navigation, where the flow remains undisturbed? The user will need a [...]]]></description>
			<content:encoded><![CDATA[<p>How does one orient oneself while biking, for example as a tourist? You certainly will read traffic signs, ask people for direction or use a tourist-map. But at least the last example will force you to stop the bike. How could we provide a navigation, where the flow remains undisturbed?<br />
The user will need a very unimposing feedback where to go.</p>
<p>Punkt.Fizn is an Android and Arduino powered bike navigation system. Unlike most navigation systems we didn’t focus on a display. Instead directions will be given only through vibrations in the handlebars. Riding a bike with Punkt.Fizn is like knowing your way already.</p>
<p><iframe src="http://player.vimeo.com/video/18481357?byline=0&amp;portrait=0" width="580" height="326" frameborder="0"></iframe></p>
<p><span id="more-3348"></span><br />
<strong>How does it work?</strong><br />
1. Choose a route from <a href="http://www.openrouteservice.org/">openrouteservice</a><br />
2. Download the route XML<br />
3. Upload it <a href="http://gps.alaingroeneweg.com/">here</a><br />
4. Start the android app and enjoy your bike ride&#8230;</p>
<p>Every time you have to turn, gentle vibrations in the handlebars will show you the way.<br />
<img src="http://www.michaelfretz.com/wp-content/uploads/2011/01/bike_with_handlebars.jpg" alt="" title="bike with handlebars" width="567" height="285" class="alignnone size-full wp-image-3398" /></p>
<p><strong>Material research:</strong><br />
We tried different materials in order to compare its conductibility of vibration. At first we used “Thermoplast”, plastic-granulate which melts on 60Celsius.<br />
Its mold able, when still warm and gets very strong and quite flexible when cooled.<br />
Unfortunately you can’t sanding it very good and it has a poor grind ability.<br />
<img class="alignnone size-full wp-image-3352" title="material01" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/material01.jpg" alt="" width="567" height="337" /><br />
So we decided to try a soft industrial-design-foam which was good to work with.<br />
The conductibility of the vibration was very good. One draw back with this material was its indurabilty.</p>
<p><img class="alignnone size-full wp-image-3353" title="blue_handle" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/blue_handle.jpg" alt="" width="567" height="378" /></p>
<p><img class="alignnone size-full wp-image-3354" title="handle_foam1" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/handle_foam1.jpg" alt="" width="567" height="376" /></p>
<p>Finally we used a more durable foam. Its has a good vibra-conductabilty and its workability lead to a smooth surface.</p>
<p><img class="alignnone size-full wp-image-3355" title="handle_finish2" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/handle_finish2.jpg" alt="" width="567" height="377" /></p>
<p><img class="alignnone size-full wp-image-3357" title="tube22" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/tube22.jpg" alt="" width="567" height="339" /></p>
<p><img class="alignnone size-full wp-image-3356" title="final1" src="http://www.michaelfretz.com/wp-content/uploads/2011/01/final1.jpg" alt="" width="567" height="339" /></p>
<p><strong>Coding:</strong><br />
To create a relatively simple but working navigation we wrote an Android application. We used Bluetooth to communicate between Android and Arduino..<br />
Our code is based on the Bluetooth Chat Example from Android.com.<br />
There are two Android Examples available:<br />
1. <a href="http://www.michaelfretz.com/wp-content/uploads/2011/01/Android2ArduinoNavigation.zip">Navigation System</a><br />
2. <a href="http://www.michaelfretz.com/wp-content/uploads/2011/01/Android2Arduino.zip">Demo Example</a> (can be a good starting point if you want to build your own Android 2 Arduino Example)<br />
<img src="http://www.michaelfretz.com/wp-content/uploads/2011/01/manual_app.jpg" alt="" title="manual_app" width="567" height="339" class="alignnone size-full wp-image-3381" /></p>
<p><strong>PHP Script</strong><br />
To get the routing we used OpenRouteService. Since the OpenRouteService XML data could not directly addressed over an API, we had to build a small PHP script that allows to simplify the desired route of OpenRouteService.org and load it up in the right format to a webserver. To parse and rebuild the XML we used SimpleXML from PHP. The current state of the navigation system is a prototype. Therefore only one device can access it at the time.<br />
Here is the sourcecode of this script:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">		Routeuploader
&nbsp;
<span style="color: #339933;">&lt;</span>h1<span style="color: #339933;">&gt;</span>Bike<span style="color: #339933;">-</span>Navigation<span style="color: #339933;">&lt;/</span>h1<span style="color: #339933;">&gt;</span>
&nbsp;
&nbsp;
<span style="color: #339933;">&lt;</span>a id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;link&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://openrouteservice.org/&quot;</span><span style="color: #339933;">&gt;</span>download openrouteservice<span style="color: #339933;">-</span>xml here<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;!--</span> The data encoding type<span style="color: #339933;">,</span> enctype<span style="color: #339933;">,</span> MUST be specified <span style="color: #b1b100;">as</span> below <span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;</span>form enctype<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;multipart/form-data&quot;</span> method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;POST&quot;</span><span style="color: #339933;">&gt;&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hidden&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;phpMyAdmin&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;3qaPcWk7TqTEf77hyhNmbFFoa%2C1&quot;</span> <span style="color: #339933;">/&gt;</span>
    		<span style="color: #339933;">&lt;!--</span> MAX_FILE_SIZE must precede the <span style="color: #990000;">file</span> input field <span style="color: #339933;">--&gt;</span>
&nbsp;
   			 <span style="color: #339933;">&lt;!--</span> Name of input element determines name in <span style="color: #000088;">$_FILES</span> <span style="color: #990000;">array</span> <span style="color: #339933;">--&gt;</span>
			 <span style="color: #004000;">Send</span> this <span style="color: #990000;">file</span><span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>Arduino</strong><br />
The Arduino microcontroller recieves the sent values from the Android application and starts a vibrations pattern for the handlebars. For each direction we have two different patterns.<br />
Here is the code:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// This Code Reads the Serial Data whoch comes from Android</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">char</span> incomingByte <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">// for incoming serial data</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ------ DIRECTION PINS INIT ---------------------</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">int</span> pinArrayLeft<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">12</span>, <span style="color: #cc66cc;">13</span>, <span style="color: #cc66cc;">14</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> pinArrayLittleLeft<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">12</span>, <span style="color: #cc66cc;">13</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> pinArrayRight<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> pinArrayLittleRight<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// ------------------------------------------------</span>
<span style="color: #000066; font-weight: bold;">int</span> timer <span style="color: #339933;">=</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> timerLittle <span style="color: #339933;">=</span><span style="color: #cc66cc;">400</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> count <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// Start serial communication</span>
  Serial1.<span style="color: #006633;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">115200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #006633;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">57600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>     <span style="color: #666666; font-style: italic;">//////////////// LINKS     pinMode(pinArrayLeft[count], OUTPUT);     pinMode(pinArrayLittleLeft[count], OUTPUT);     //////////////// RECHTS     pinMode(pinArrayRight[count], OUTPUT);     pinMode(pinArrayLittleRight[count], OUTPUT);   } } void loop() {   while (Serial1.available() &amp;gt; 0)</span>
  <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">byte</span> serialreadbytevalue <span style="color: #339933;">=</span> Serial1.<span style="color: #006633;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    Serial.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>serialreadbytevalue<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>serialreadbytevalue<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">49</span><span style="color: #339933;">:</span>
        goLeft<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: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">:</span>
        goLittleLeft<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: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">51</span><span style="color: #339933;">:</span>
        goRight<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: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">52</span><span style="color: #339933;">:</span>
        goLittleRight<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>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> goLeft<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLeft<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, HIGH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLeft<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> goRight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayRight<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, HIGH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayRight<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">void</span> goLittleLeft<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLittleLeft<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, HIGH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timerLittle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLittleLeft<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timerLittle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> goLittleRight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>count<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>count<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>count<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLittleRight<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, HIGH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timerLittle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   digitalWrite<span style="color: #009900;">&#40;</span>pinArrayLittleRight<span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span>, LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   delay<span style="color: #009900;">&#40;</span>timerLittle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>Next Steps</strong><br />
The next step would be integrate <a href="http://code.google.com/p/osmand/">OSMAND</a> for the navigation. This way the hole navigation process would be easier.</p>
<p><strong>Team</strong><br />
<a href="http://www.alaingroeneweg.com" target="_blank">Alain Groeneweg</a> | <a href="http://dannyandme.ch/" target="_blank">Danny Arielli</a> | <a href="http://www.michaelfretz.com" target="_blank">Michael Fretz</a></p>
<p><strong>Links to site or magazines that mention us</strong><br />
<a href="http://androidportal.hu/2011-01-09/navigalj-bringan-androiddal-biztonsagosan">androidportal.hu</a><br />
<a href="http://www.androidpolice.com/2011/01/06/android-device-built-into-handlebars-bike-navigation-evolved/">androidpolice.com</a><br />
<a href="http://techup.ch/105/40th-swiss-flash-user-group-meeting">http://techup.ch/105/40th-swiss-flash-user-group-meeting</a><br />
<a href="http://iad.zhdk.ch/de/stories/11/01/embodied-interaction-press">http://iad.zhdk.ch/de/stories/11/01/embodied-interaction-press</a><br />
<a href="http://www.michaelfretz.com/wp-content/uploads/2011/01/IMAG0060.jpg">Weave, interactive design, konzeption &#038; development 02.11 April/Mai Page 16</a></p>
<p><em>This project was part of Embodied Interacion Modul at the Interaction Design Programm from the university of the arts in Zurich. All infos about this course <a href="http://blogs.iad.zhdk.ch/embodied-interaction/bike-navigatio/">http://blogs.iad.zhdk.ch/embodied-interaction/bike-navigatio/</a><br />
Teachers: Max Rheiner and Karmen Franinovic</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2011/01/03/punkt-fizen-android-and-arduino-powered-bike-navigation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Migros Terra Suisse &#8211; Who Is Muh</title>
		<link>http://www.michaelfretz.com/2010/07/10/migros-terra-suisse-who-is-muh/</link>
		<comments>http://www.michaelfretz.com/2010/07/10/migros-terra-suisse-who-is-muh/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 10:17:42 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Webapplikation]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[migros]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=3228</guid>
		<description><![CDATA[The last couple of weeks I had the possibility to work for Jung von Matt, one of the leading advertisement agencies in Europe. I worked on different small projects but mainly on the Migros Terra Suisse Microsite &#8220;Who is Muh&#8221;. What is &#8220;Who is Muh&#8221;? &#8220;Who is Muh&#8221; is an interactive platform for the Migros [...]]]></description>
			<content:encoded><![CDATA[<p>The last couple of weeks I had the possibility to work for <a href="http://www.jvm.ch" target="_blank">Jung von Matt</a>, one of the leading advertisement agencies in Europe. I worked on different small projects but mainly on the <a href="http://94.126.17.222/" target="_blank">Migros Terra Suisse Microsite &#8220;Who is Muh&#8221;</a>.</p>
<p><strong>What is &#8220;Who is Muh&#8221;?</strong><br />
&#8220;Who is Muh&#8221; is an interactive platform for the Migros brand Terra Suisse. This interactive site shows different animals from the Terra Suisse program and explains what each animal does and how the animals are being treated and raised by their farmers.</p>
<p><img class="alignnone size-full wp-image-3243" title="migros_terrasuisse" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/migros_terrasuisse2.jpg" alt="" width="578" height="419" /></p>
<p><span id="more-3228"></span></p>
<p><strong>Terra Suisse Animals and there Language</strong><br />
In the section animals and their language each animal explains briefly how they are being treated and what they do all day long. Each animal explains some things about its live and the environment it grows up in.</p>
<p><img class="alignnone size-full wp-image-3233" title="terrasuisse_animal_music" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_animal_music.jpg" alt="" width="580" height="439" /></p>
<p><strong>Muh Mix</strong><br />
The Muh Mix is a game like part of the site. Per drag and drop users can place animals into a play-list and arrange the order of the animal voices. If a user is happy with his choice he can play the song he created, share it on Facebook or send it through an email to his friends. If a user thinks the song he just made is great he can download it as an mp3 or m4r (iPhone Ring-tone format).</p>
<p><img class="alignnone size-full wp-image-3234" title="terrasuisse_animal_sound_1" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_animal_sound_1.jpg" alt="" width="580" height="439" /></p>
<p><img class="alignnone size-full wp-image-3235" title="terrasuisse_animals_sound" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_animals_sound.jpg" alt="" width="580" height="439" /></p>
<p><strong>iPhone App</strong><br />
In addition to this site there is an iPhone app, available on the iTunes Store. Install it and enjoy cute animals on your phone.</p>
<p><img class="alignnone size-full wp-image-3236" title="terrasuisse_iphone" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_iphone.jpg" alt="" width="580" height="439" /></p>
<p><strong>Coding Base</strong><br />
The hole application is build in Object Oriented AS3. I was able to apply some design patterns in this app, for example I applied the singelton pattern on the objects that store the data in the application. This enabled me easy access to all my data from anywhere in the application.. Everything language related is saved in XML and dynamicaly loaded by the migros website. The platform runs on a FreeBSD server managed by my own Company <a href="http://www.cubera.ch" target="_blank">Cubera Solutions GmbH</a>. For generating the mp3 and m4r we created a php script which concatted the different small animal sound fragments to one mp3 file and for the secondary download option as m4r we used ffmpeg to convert.</p>
<p><img class="alignnone size-full  wp-image-3237" title="terrasuisse_tellafriend" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/terrasuisse_tellafriend.jpg" alt="" width="580" height="439" /></p>
<p><img class="alignnone size-full wp-image-3239" title="iPhoneApp" src="http://www.michaelfretz.com/wp-content/uploads/2010/06/iPhoneApp.jpg" alt="" width="580" height="439" /></p>
<p><strong>Looking back</strong><br />
After finishing this project I&#8217;m very happy with it. All requested functionality could be built even-though we didn&#8217;t know if it is possible in the first place. The site works quite good and its cute and fun to play with it.<br />
Many thanks to Claude Ebersold from <a href="http://www.jvm.ch" target="_blank">Jung von Matt</a> for providing all the cute graphics and for pushing me to work all day and night. Also thanks to Nadja Holdener for helping us where-ever help was needed, for creating many of the animations, and especially for learning and handling SVN so quickly. A special thank goes to Matthias Adolf for leading the project and letting me be part of it. Thank you all!</p>
<p><strong>Try it</strong><br />
You can try this application <a href="http://94.126.17.222/" target="_blank">here</a> (german)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2010/07/10/migros-terra-suisse-who-is-muh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to avoid caching of XML-files in Actionscript projects</title>
		<link>http://www.michaelfretz.com/2009/08/22/how-to-avoid-caching-of-xml-files-in-actionscript/</link>
		<comments>http://www.michaelfretz.com/2009/08/22/how-to-avoid-caching-of-xml-files-in-actionscript/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 15:28:03 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=2796</guid>
		<description><![CDATA[A wile ago I had a problem with external XML files loaded in to my Actionscript project. Some browser always used an older version of my XML and didn&#8217;t reload it every time I reloaded the page. An easy way to avoid this is the following solution: As you can see I added to the [...]]]></description>
			<content:encoded><![CDATA[<p>A wile ago I had a problem with external XML files loaded in to my Actionscript project. Some browser always used an older version of my XML and didn&#8217;t reload it every time I reloaded the page. An easy way to avoid this is the following solution:<br />
<img class="alignnone size-full wp-image-2797" title="avoid caching in xml" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/avoidcachinginxml.png" alt="avoid caching in xml" width="560" height="407" /><br />
As you can see I added to the string of the path a question mark and a random number. Every time the page is reloaded it generates a new path to the XML file. The only changes are behind  the question mark and will not affect the XML file</p>
<p><a href="http://www.michaelfretz.com/wp-content/uploads/2009/08/XMLwithoutCaching_as.zip">Download the XMLwithoutCaching.as File</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/08/22/how-to-avoid-caching-of-xml-files-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML Visualization with AS3.0, Tween Lite, MojoFont, PHP 5 and MySQL</title>
		<link>http://www.michaelfretz.com/2009/08/20/xml-visualization-with-as30-tween-lite-mojofont-php-5-and-mysql/</link>
		<comments>http://www.michaelfretz.com/2009/08/20/xml-visualization-with-as30-tween-lite-mojofont-php-5-and-mysql/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 11:26:33 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Interface Design]]></category>
		<category><![CDATA[mojofont]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tween lite]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/?p=2740</guid>
		<description><![CDATA[One of the main reason I use Actionscript 3.0 is to create data visualization. Most times the data is saved in a XML or database. Therefore I would like to show you some parts of of a recently developed program. Here is an example of the final result. (Please open the article to see the [...]]]></description>
			<content:encoded><![CDATA[<p>One of the main reason I use Actionscript 3.0 is to create data visualization. Most times the data is saved in a XML or database. Therefore I would like to show you some parts of of a recently developed program.<br />
Here is an example of the final result.</p>
<p><object type="application/x-shockwave-flash" data="http://www.michaelfretz.com/wp-content/uploads/2009/08/Hagedorn_Organigramm.swf" width="580" height="600" class="embedflash"><param name="movie" value="http://www.michaelfretz.com/wp-content/uploads/2009/08/Hagedorn_Organigramm.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><small>(Please open the article to see the flash file or player.)</small></object></p>
<p><span id="more-2740"></span></p>
<p><strong>Font Embedding</strong></p>
<p>Because most time you visualize data you need to write some text to it. If you have done any pure ActionScript projects in Flex or FDT you know this stuff sucks. The resulting code looks like this and it takes hours of googling to get to the right embed parameters/tags.</p>
<p><img class="alignnone size-full wp-image-2742" title="Font embedding" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/fontembeddingoldfashinway.jpg" alt="Font embedding" width="580" height="185" /></p>
<p>But now the way of font handling in Actionscript changed. My colleague Philipp Laeubli created a plugin for eclipse which makes font embedding a piece of cake. If your interested in this, just apply for a private beta account on <a href="http://mojofont.badmojo.ch" target="_blank">mojofont.badmojo.ch</a>.<br />
Here a little example how to embed a font with the mojofont plugin.<br />
<img class="alignnone size-full wp-image-2743" title="Font embedding with mojofont" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/fontembeddingeasyway.png" alt="Font embedding with mojofont" width="425" height="178" /></p>
<p>Instead of writing a whole bunch of metacode and doing some strange font registration, you import your font, and then you can use ist like this: Helvetica.createTextField(). Thats it. All the nasty embedding code and other things are completely handled by the plugin which generates a simple to use and embed swc file.</p>
<p><strong>Tweening</strong><br />
For the hole tweening I used the tweenlite library from <a href="http://blog.greensock.com/tweenliteas3/" target="_blank">http://blog.greensock.com/tweenliteas3/</a>. In my opinion it is one of the best tweening libarys and very easy to use.</p>
<p><strong>XML Loading</strong><br />
I wrote a XMLLoader class. The XMLLoader class loads the hole data of the XML into a String. As soon as its finishes with loading, it dispatches an event. With the getter methods its easy to recive the data and use it afterwards in your programm.</p>
<p><img class="alignnone size-full wp-image-2749" title="xmlloader1" src="http://www.michaelfretz.com/wp-content/uploads/2009/08/xmlloader1.jpg" alt="xmlloader1" width="512" height="554" /></p>
<p><strong>PHP File to generate XML</strong><br />
Many of you will ask why I id use XML. In my opinion its the easiest way of recieving data and its easy to generate it from a database. To generate the XML file I developed a PHP file. This file connects to a MySQL database and loads the whole content of the defined table.  At the moment you will have to define the used fields by hand. First of all, be sure you have all the needed fields in your database. Afterwards change the values in the begin of the mysqlToXML.php file. You have two options. 1: Make the PHP file look like an XML after loading it or 2: let it generate an external file. The first one is the better way if you change often data but dont have to many visitors. The option with the external file is a good option if you want to save database connections because you only ned to generate the XML file once you have changed some data. If you use the external XML file option, be sure that you have the write permission set on your webspace. After you generated your XML just make sure your XML loader class in your Actionscript project knows the path to the file. If you use the other option just add the path of the mysqlToXML.php in your Actionscript project.<br />
<a href="http://www.michaelfretz.com/wp-content/uploads/2009/08/mysqlToXML.zip">Download mysqlToXML.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/08/20/xml-visualization-with-as30-tween-lite-mojofont-php-5-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vorlesungsverzeichnis XML AS3</title>
		<link>http://www.michaelfretz.com/2009/01/13/vorlesungsverzeichnis-xml-as3/</link>
		<comments>http://www.michaelfretz.com/2009/01/13/vorlesungsverzeichnis-xml-as3/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 15:14:45 +0000</pubDate>
		<dc:creator>Michael Fretz</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Studium]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Interaktion]]></category>
		<category><![CDATA[Visualisierung]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.michaelfretz.com/2009/01/13/vorlesungsverzeichnis-xml-as3/</guid>
		<description><![CDATA[Im Modul: Digitaler Modulbau 3 lernten wir die Grundlagen des XML Handlings. Dazu haben wir das Vorlesungsverzeichnis der Zürcher Hochschule der Künste neu visualisiert. Die Unterschiedlichen XML Dateien werden dynamisch vom Server der ZHdK in das Projekt geladen. Vorlesungsverzeichnis nachdem das Departement XML geladen ist. Übersicht der Module welche in einer Vertiefung angeboten werden. Durch [...]]]></description>
			<content:encoded><![CDATA[<p>Im Modul: Digitaler Modulbau 3 lernten wir die Grundlagen des XML Handlings. Dazu haben wir das Vorlesungsverzeichnis der Zürcher Hochschule der Künste neu visualisiert. Die Unterschiedlichen XML Dateien werden dynamisch vom Server der ZHdK in das Projekt geladen.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/vorlesungsverzeichnis_preview1.png" alt="Vorlesungsverzeichnis XML Visualisierung Übersicht Departemente" /></p>
<p>Vorlesungsverzeichnis nachdem das Departement XML geladen ist.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/vorlesungsverzeichnis_preview3.png" alt="Vorlesungsverzeichnis XML Visualisierung Modulanzeige" /></p>
<p>Übersicht der Module welche in einer Vertiefung angeboten werden. Durch dir Pfeile kann durch die Module durchgeblättert werden.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/vorlesungsverzeichnis_preview4.png" alt="Vorlesungsverzeichnis XML Visualisierung Modul Details" /></p>
<p>Anzeige eines Moduls.</p>
<p>Zur Programmierung:</p>
<p>Die Dokumentklasse fungiert als Viewer und Controller. Alle Elemente werden hier plaziert. Je nach dem was geklickt wird, entscheidet die Dokumentklasse welches XML geladen werden soll.</p>
<p>Die XML Loaderklasse kann jedes beliebige XML laden. Sind die Daten geladen wird ein Dispatch Event ausgeschossen. Über get Methoden werden Name und Daten zurück geliefert.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/xmlloader.jpg" alt="XML Loader" /></p>
<p>Auszug aus der XML Loaderklasse</p>
<p>Die XML Manager Klasse bekommt die Daten aus der XML Loaderklasse. Die erhaltenen Daten werden in einen Array gespeichert und anschliessend wird ein Dispatch Event ausgeschossen.</p>
<p><img src="http://www.michaelfretz.com/wp-content/uploads/2009/01/xmlmanager.jpg" alt="XML Manager" /></p>
<p>Auszug aus der XML Manager Klasse</p>
<p>URL zur Demo: <a href="http://vorlesungsverzeichnis.michaelfretz.com/">http://vorlesungsverzeichnis.michaelfretz.com </a></p>
<p>Download <a title="Flex Projekt des Vorlesungsverzeichnis" href="http://www.michaelfretz.com/wp-content/uploads/2009/01/vorlesungsverzeichnisvisualisierung.zip">Flex Projekt des Vorlesungsverzeichnis</a> (104 KB)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelfretz.com/2009/01/13/vorlesungsverzeichnis-xml-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

