<?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>neophob.com</title>
	<atom:link href="http://neophob.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://neophob.com</link>
	<description>are you still afraid?</description>
	<lastBuildDate>Mon, 23 Apr 2012 21:57:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Long distance SPI installation: Lessons Learned</title>
		<link>http://neophob.com/2012/04/long-distance-spi-installation-lessons-learned/</link>
		<comments>http://neophob.com/2012/04/long-distance-spi-installation-lessons-learned/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 17:59:19 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1646</guid>
		<description><![CDATA[In a previous blog post I wrote about my issues with a LPD6803 based installation and long cables. To illustrate my installation I paste the wiring diagram here: After some exhausting debug sessions I found several issues. 1) Check your installation … especially after some late night hacking sessions. For example this cable should carry [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://neophob.com/2012/03/lpd6803-spi-and-long-distance/">previous blog post</a> I wrote about my issues with a LPD6803 based installation and long cables. To illustrate my installation I paste the wiring diagram here:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/04/power-diag-mini.png" alt="" title="power-diag-mini" width="600" height="245" class="aligncenter size-full wp-image-1700" /></center></p>
<p>After some exhausting debug sessions I found several issues.</p>
<p><strong>1) Check your installation</strong><br />
… especially after some late night hacking sessions. For example this cable<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/04/power-error.png" alt="" title="power-error" width="550" height="211" class="aligncenter size-full wp-image-1703" /></center><br />
should carry more than 3 Ampere@12 Volt, <strong><em>BAD idea!</em></strong></p>
<p><strong>2) Check for common Ground</strong><br />
Ground is the reference point for the data lines. With different cable lengths to the power supply you can have major potential differences, this is kinda bad. In this example the ground cable is <strong>NOT</strong> routed:<center><img src="http://neophob.com/wp-content/uploads/2012/04/bad.png" alt="" title="bad" width="500" height="576" class="aligncenter size-full wp-image-1662" /><br />
</center></p>
<p>Good Cabling, the ground cable <strong>is routed</strong>:<center><img src="http://neophob.com/wp-content/uploads/2012/04/good.png" alt="" title="good" width="500" height="576" class="aligncenter size-full wp-image-1663" /></center></p>
<p><strong>3) Use a dead simple circuit simulator</strong><br />
Check <a href="http://www.falstad.com/circuit/" title="http://www.falstad.com/circuit/">http://www.falstad.com/circuit/</a> for a simple and easy to use circuit simulator, thanks for this Java application! Great to debug your hardware circuits.<center><img src="http://neophob.com/wp-content/uploads/2012/04/circuitSimulator.png" alt="" title="circuitSimulator" width="716" height="555" class="aligncenter size-full wp-image-1711" /></center></p>
<p><strong>4) SPI Buffer (74AC245N) to improve the SPI Clock Signal</strong><br />
The only problem left were the two last modules, they just flicker from time to time. Thanks to <a href="http://www.led-stuebchen.de">Andre Zibell</a> from the <a href="http://www.ledstyles.de">http://www.ledstyles.de</a> board, he designed a busdriver to clean a (SPI) signal with a 74AC245N IC (Cornerpinning busdriver):<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/04/rev002a.png" alt="" title="rev002a" width="550" height="446" class="aligncenter size-full wp-image-1674" /></center></p>
<p>Andre was kind enough to send me two PCB’s, unfortunately I don’t really like (can?) solder SMT components, thats why I had to use a breadboard. I found <a href="http://blackboard.serverpool.org/Home.html">BlackBoard breadboard designer</a> very useful:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/04/breadboard74ac245.png" alt="" title="breadboard74ac245" width="512" height="399" class="aligncenter size-full wp-image-1687" /></center></p>
<p>I build my first prototype on breadboard:<br />
<center><br />
<img src="http://neophob.com/wp-content/uploads/2012/04/breadboard-front.png" alt="" title="breadboard-front" width="550" height="353" class="aligncenter size-full wp-image-1691" /><br />
<img src="http://neophob.com/wp-content/uploads/2012/04/breadboard-back.png" alt="" title="breadboard-back" width="550" height="346" class="aligncenter size-full wp-image-1692" /><br />
</center></p>
<p>I installed the buffer breadboard after 4 large modules, the result was disastrous! No LED was blinking correctly after the breadboard, so I hooked up my DSO Quad and took a look at the signals:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/04/signal-with-74AC245-v1.jpg" alt="" title="signal-with-74AC245-v1" width="550" height="346" class="aligncenter size-full wp-image-1695" /></center><br />
The <strong>cyan</strong> signal shows the input signal to the breadboard while the <strong>yellow</strong> output shows the output. Conclusion:</p>
<ul>
<li>The buffer breadboard is working, the signal flanks are steeper</li>
<li>The signal is already greatly distorted, I need an earlier buffer breadboard. The signal flanks are too weak to form a clean “up” signal, so they get crippled</li>
</ul>
<p>I use an 1 kOhm resistor between Clock and Ground, this improved the clock signal.</p>
<p><strong>5) SPI Speed</strong><br />
The faster the SPI sig­nal is, the more vul­ner­a­ble it is. Take a look at this chart:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SPI_CLOCK_DIV64 — 0.25MHz — 4uS per wave length<br />
SPI_CLOCK_DIV32 — 0.50MHz — 2uS per wave length<br />
SPI_CLOCK_DIV16 — 1.00 MHz — 1uS per wave length</div></td></tr></tbody></table></div>
<p>If your hardware (cable length…) is not optimal, reduce the SPI speed. This sounds very easy in theory, but its more difficult in practice, especially if you have an ISR to shift out some data, take a look at this real life example:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">strip.setCPUmax(80);       // Setup TimerOne ISR to shift out data<br />
strip.begin(SPI_CLOCK_DIV32); // Start up the LED counter 0.5MHz</div></td></tr></tbody></table></div>
<p>The code above was working fine, but the last modules were not working fine. I reduced the SPI clock speed to 0.25MHz but the update speed was extremely slow. I did some experimenting and found out that I had to lower the CPU usage:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">strip.setCPUmax(49);       // Setup TimerOne ISR to shift out data<br />
strip.begin(SPI_CLOCK_DIV64); // Start up the LED counter 0.25MHz</div></td></tr></tbody></table></div>
<p>This was finally the solution (don’t forget the 1kOhm resistor between CLK and DATA!), without additional hardware (speak: no SPI buffer)!. <strong>After countless hours, the installation finally works! </strong></p>
<p>Other notable remarks:</p>
<ul>
<li>Never EVER prepare cables on your own!</li>
<li>Create a project log, so you need to search each bug only once…</li>
</ul>
<p>Thanks to <a href="http://www.ledstyles.de/">LED Styles</a> and <a href="http://dangerousprototypes.com/forum">Dangerous Prototype</a> for your help!</p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2012/04/long-distance-spi-installation-lessons-learned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DSO Quad for Dummies</title>
		<link>http://neophob.com/2012/03/dso-quad-for-dummies/</link>
		<comments>http://neophob.com/2012/03/dso-quad-for-dummies/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 08:27:58 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[DSO]]></category>
		<category><![CDATA[Firmware]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[seeedstudio]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1533</guid>
		<description><![CDATA[I just recieved my DSO Quad from Boxtec/Seeedstudio. Because the documentation of this product is not really .. “ideal” I thought I write my steps down. 10 Years ago I used Oscilloscope for my daily job, however those were analog Oscilloscope and in another price class. Make sure you can connect your battery by checking [...]]]></description>
			<content:encoded><![CDATA[<p>I just recieved my DSO Quad from Boxtec/Seeedstudio. Because the documentation of this product is not really .. “ideal” I thought I write my steps down. 10 Years ago I used Oscilloscope for my daily job, however those were analog Oscilloscope and in another price class.</p>
<p>Make sure you can connect your battery by checking <a href="http://www.seeedstudio.com/forum/viewtopic.php?f=22&#038;t=1911">THIS forum thread</a>.</p>
<p>You can find the official Quad manual (DSO Quad v2 6 Manual 0.92b.rar) <a href="http://www.seeedstudio.com/forum/viewtopic.php?f=22&#038;t=1929">in this thread</a>.</p>
<p>I own the v2.6 Hardware running SYS v1.51 and APP v2.52. I downloaded the application firmware file AP3_P100, check<a href="http://www.seeedstudio.com/wiki/DSO_Quad:Upgrading_Firmware">Firmware Upgrade Wiki</a> for a detailed firmware update. Then I started the DSO Quad in the “Firmware Upgrade Mode” (press “&gt; ||” during startup). The I copied the AP3_P100.hex (Note: the unzipped file!) file to the USB disk and waited until the file gets renamed to AP3_P100.rdy). When the file gets renamed, power cycle your Quad to finish the upgrade process.</p>
<p>Here is an overview what kind of Keys the DSO Quad has:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/03/quadkeys2.png" alt="" title="quadkeys2" width="553" height="461" class="aligncenter size-full wp-image-1545" /></center></p>
<ul>
<li><strong>Run/Hold</strong>: is used to control working state of Quad: Working or Pause</li>
<li><strong>Calibrate</strong>: Press more than 2s to enter the calibrate mode if the active menupoint is a analog input.</li>
<li><strong>Preset</strong>: Save current setting (Signal Generator, Time dimensions?), they are loaded each time the Quad is started. Handy if you, for example, want to mute the beep.</li>
<li><strong>Sine Wave</strong>: Used to save a Screenshot</li>
<li><strong>Navigator B</strong>:Navigate in the main menus. Press change the Menu entry while push/pull change the current setting.</li>
<li><strong>Navigator A</strong>: Navigate in the submenu (after a menu was selected with Navigator B).</li>
</ul>
<p><strong>Calibration</strong><br />
You need to calibrate the device itself and the probes. You need an external power meter and a very fine screwdriver, I miss both utils so I didn’t adjust my DSO Quad yet.</p>
<p><strong>Edit</strong>: <a href="http://hifiduino.wordpress.com/2011/04/30/dso-quad-quick-start-guide/">the hifiduino blog entry</a> about the Quad have some great tips about calibrate the device:</p>
<p>“One needs to know that the probes that come with the unit are not compensated. After quick schematic review I figured out that C3A and C5A adjust compensation for channel A, and C4A and C6A for channel B. These trimmer caps are accessible under the battery, btw”<br />
</center><img src="http://neophob.com/wp-content/uploads/2012/03/quad-calibrate.jpeg" alt="" title="quad-calibrate" width="600" height="378" class="aligncenter size-full wp-image-1585" /></center></p>
<ul>
<li>Use the built-in signal generator to generate a square wave. 10KHz is a good frequency to see the overshoot</li>
<li>Connect one probe to the signal generator output and one probe to channel A or channel B (there is no need to connects the GNDs but you can connect them if you wish). Feed the signal to channel A (or channel B)</li>
<li>In order to adjust the compensation capacitors <strong>you need a plastic screwdriver</strong>. Since I did not have one, I took a pen cap and sharpened the little plastic stick of the pen cap with sand paper</li>
<li>Turn/adjust the caps until the overshoots are eliminated as shown in the picture below</li>
</ul>
<p><strong>Waveform generator</strong><br />
Some facts about the Waveform generator I found on the Forum:</p>
<ul>
<li>the output should be about2.6~2.8 Vpp</li>
<li>a guy reported this issue in the Forum: “It correctly outputs a square waveform at any frequency 1Vpp. But when trying to set any other waveform, all I get is a square waveform with some modifications at the top part which vaguely reminds of a sine or sawtooth or triangular waveform but has nothing to do with any of them.“<br />The waveform looks like this:<br /><img src="http://neophob.com/wp-content/uploads/2012/03/imag000.bmp" alt="" title="Waveform Generator Error" class="aligncenter size-full wp-image-1554" />
<p>I this case your DSO Quad has a hardware defect! (Unfortunately in my case the problem was not the double zener D6, but the op amp U7.)</li>
</ul>
<p><strong>Save Waveforms as BMP / Screenshot</strong><br />
<strong>Edit 21.3.2012:</strong> This step is obsolete!<br />
In order to save a screenshot of the Quad, you first need to create some BMP Files and copy them to the internal 2MB USB Disk. The BMP Files need to have a resolution of 400x240 and a bitdepth of 4 (32Bit). I found the file “Save wave for DSOQuad.rar” on the Seeedstudio Forum, here is the readme:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Module to save:<br />
Because there is no keyboard to input name of files, this module is needed:<br />
Copy the Filexxx.BMP or Filexxx.DAT, and rename the xxx to 000~999, from 000,001,002.….<br />
<br />
Save waveform as .bmp<br />
1.Copy the Filexxx.BMP to the 2M USB disk, rename the xxx as 000,001,002.…..<br />
2.Navigate to the save menu, select “Save file”,“xxx(the one you select to use)” and “.BMP“<br />
3.Push button ‘S’(The forth button on QUAD)<br />
4.Reset the Quad ‚you will see the saved BMP in your USB disk.<br />
<br />
Save and recall .DAT<br />
1.Copy the Filexxx.DAT to the 2M USB disk, rename the xxx as 000,001,002.…..<br />
2.Navigate to the save menu,select “Save fiel”,“xxx(the one you select to use)” and “.dat“<br />
3.Push button ‘S’ to store the data into .dat file<br />
4.In order to recall the data you stored in the USB disk, first navigate to the save menu, select the “load file”“xxx(the one you want to recall)“and “.dat“<br />
5.Navigate to the CHD, select the show mode as File_x(the data in which channel you stored  ), and, you can get the recalled waveform .</div></td></tr></tbody></table></div>
<p>Use Navigator B to select the “Save File” dialog, then press the “Save Wave” Button.</p>
<p><strong>Memory Slots:</strong><br />
The Quad has 4 different Memory slots, each slot can contain a different Application. The stock firmware is installed in Slot 1. You can select the slot by pressing a button during startup:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/03/buttons.png" alt="" title="Select APP During Boot" width="401" height="139" class="aligncenter size-full wp-image-1579" /></center><br />
To start application form slot 4, hold the fourth button down while turning on the power.</p>
<p><strong>3rd Party Firmware:</strong><br />
<strong>Hint:</strong> Firmware update on OSX does not work! OSX fills the disk with hidden files, the DFU disk appears/disappears in a 3s interval. My USB disk is also filled with garbage, I had to reformat it (on a Windows machine)</p>
<ul>
<li><a href="https://github.com/pmos69/dso203_gcc">DSO203 GCC Community Edition</a> (installs in slot 1). You also need the SYS from <a href="https://sites.google.com/site/marcosinatti/elettronica/dso">Marco Sinatti</a></li>
<li><a href="https://github.com/gabonator/DS203">https://github.com/gabonator/DS203</a></li>
<li><a href="http://essentialscrap.com/dsoquad/freq.html">Frequency response application</a> (installs in slot 4)</li>
<li><a href="http://essentialscrap.com/dsoquad/logic.html">Logic Analyzer</a> (installs in slot 3)</li>
<li><a href="http://seeedstudio.com/forum/viewtopic.php?f=22&#038;t=2344">Tetris</a> (installs in slot 3)</li>
</ul>
<p><strong>Conclusion:</strong><br />
After working/playing with my Quad for about 3h I must say I can work with it. However the navigation is not very intuitive, maybe I change my mind if i keep working with the Quad. If you need an Oscilloscope now and then and you’re not operating in the GHz range, the Quad is a nice tool! However, <strong>never ever connect the Quad to OSX</strong>, the Quads internal SD memory get messed up. You need a Windows (or Linux) OS if you want to update the Firmware or get images from the Quad.</p>
<p><strong>References:</strong></p>
<ul>
<li><a href="http://essentialscrap.com/dsoquad/freq.html">http://essentialscrap.com/dsoquad/freq.html</a></li>
<li><a href="http://hifiduino.wordpress.com/2011/04/30/dso-quad-quick-start-guide/">http://hifiduino.wordpress.com/2011/04/30/dso-quad-quick-start-guide/</a></li>
<li><a href="http://www.seeedstudio.com/forum/viewforum.php?f=22">Seeedstudio Forum</a></li>
<li><a href="http://seeedstudio.com/wiki/DSO_Quad">Seeedstudio Wiki</a></li>
<li><a href="http://www.valky.eu/?data/hardware/ds203.txt">http://www.valky.eu/?data/hardware/ds203.txt</a></li>
<li><a href="http://zone.ni.com/devzone/cda/tut/p/id/4333">Top 10 Things to Consider When Selecting a Digitizer/Oscilloscope</a></li>
</ul>
<p><strong>Competitors:</strong></p>
<ul>
<li> <a href="http://www.quantasylum.com/content/Products/QA100.aspx">QA100, Dual Analog Channel w/10-bit ADC, 100 Msps, Deep Buffers and 12 Digital Channels</a>, $349</li>
<li><a href="http://www.rigolna.com/products/digital-oscilloscopes/ds1000e/ds1052e/">Rigol DS1052E</a></li>
<li><a href="http://www.picotech.com/">Picotech</a> USB Oszilloscope</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2012/03/dso-quad-for-dummies/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LPD6803, SPI and long distance</title>
		<link>http://neophob.com/2012/03/lpd6803-spi-and-long-distance/</link>
		<comments>http://neophob.com/2012/03/lpd6803-spi-and-long-distance/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 11:48:49 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Firmware]]></category>
		<category><![CDATA[Led]]></category>
		<category><![CDATA[PixelInvaders]]></category>
		<category><![CDATA[SPI]]></category>
		<category><![CDATA[teensy]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1473</guid>
		<description><![CDATA[I want to drive several units (boxes) filled with LPD6803 LED Modules (8–14 Led modules per box). Each unit is connected with a 70cm, unshielded and non twisted cable. I used those modules in the past without problems in my PixelInvaders project, however there are no long cables involved. My new project looks like this: [...]]]></description>
			<content:encoded><![CDATA[<p>I want to drive several units (boxes) filled with LPD6803 LED Modules (8–14 Led modules per box). Each unit is connected with a 70cm, unshielded and non twisted cable. I used those modules in the past without problems in my <a href="http://pixelinvaders.ch/?page_id=322">PixelInvaders project</a>, however there are no long cables involved. </p>
<p>My new project looks like this:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[UNIT#1]—[UNIT#2]—[UNIT#3]—[UNIT#4]—[UNIT#5]—[UNIT#6]—[UNIT#7]—[UNIT#8]</div></td></tr></tbody></table></div>
<p><strong>Total cable length</strong>: 50cm internal cable per unit (4m), the connecting cable measures 2m and 7 connecting cables à 70cm makes a total of approximately <strong>11m</strong>.</p>
<p>In the beginning I was using the bit<a href="https://github.com/neophob/PixelController/tree/master/data/ArduinoFw/lpd6803/neoLedLPD6803"> banging LPD6803 firmware</a>. That worked quite ok, but the update times were not very fast and there were some visible glitches (white flashing aka. ringing). Fading all Leds from black to white was not working at all, very much noise (random color) was visible!</p>
<p>So I start using the new <a href="https://github.com/neophob/neophob_lpd6803spi">SPI LPD6803 firmware</a> which should update the LED Modules much faster (only MOSI and SCLK pins are used). The first unit is working very fast and clean, however between unit#2 and unit#7 I just see flicker… looks like the cables or connectors make some trouble here.</p>
<p>According to the LPD6803 datasheet the chip provides “<em>Adopt self-add token-ring technology dual shift line, shift clock can reach 24MHz</em>” and “<em>Data clock signal is drived strongly to next chip to enhance level after built-in phaselock circuit</em>”.</p>
<p>I use a LPD6803 based Led Module which looks like this:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/03/lpd6801Module.png" alt="" title="lpd6801Module" width="450" height="479" class="aligncenter size-full wp-image-1508" /></center><br />
I assume the 3 components on the left (1 kOhm resistor, NPN transistor and capacitor (30pF?)) is used as <strong>voltage regulation</strong>, the 3 resistors on the bottom (150 Ohm, 180 Ohm and 330 Ohm) are used to <strong>control the Led diodes</strong> (different values due different eye sensitivity for different colors?) and the two 51 Ohm resistor on the right are <strong>SPI (SCK and MOSI lines) “terminators”</strong> to prevent signal echo (Fail Safe Termination?).</p>
<p>This assumption would match the scheme from the lpd6803 datasheet:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/03/lpd6803-schema.png" alt="" title="lpd6803-schema" width="339" height="269" class="aligncenter size-full wp-image-1517" /> </center></p>
<p>Now let’s take a look at the SPI “Standard”.</p>
<blockquote><p>The serial peripheral interface (SPI) bus is an unbalanced or single-ended serial interface designed for short-distance communication between integrated circuits.</p></blockquote>
<p>…aha, guess 70cm of unshielded cable does not really match “short-distance communication between integrated circuits”. Anyway I searched some <strong>common issues with SPI communication</strong>:</p>
<ul>
<li>Noise on the DC level</li>
<li>Impedance of the SPI lines.</li>
<li>Reflexion of the SPI signal due missing or wrong termination resistor, the RS-422 standard suggests a 100 Ohm resistor.</li>
<li>Use twisted-pair cable, because the conductors of twisted-pair cable are closely electrically coupled, external noise induced equally into both conductors appears as common-mode noise at the receiver input. You can use each SPI line sent in a twisted pair (SCLK/GND, MOSI/GND)</li>
<li>Cable length is too long compared to the SPI frequency</li>
</ul>
<p>Back to my modules, compare the common issues with my situation:</p>
<p><strong>Noise on the DC level:</strong><br />
A possible issue, the capacitor on the LED module is just used to prevent a AC less voltage on the LPD6803 IC. According to the scheme, the 12V is applied directly to the LED diodes.</p>
<p><strong>Impedance of the SPI lines:</strong><br />
I do have some issues here. I first added a 50Ohm and 220Ohm resistor between SCLK and ground, the result was bad (no more animation), I guess the resistor was too low, thus the CLK signal vanished. Then I added a 1 kOhm resistor, the animation was working fine! So I started to add a 1 kOhm resistor on the other units. The Leds were working, however the more units I connected the more flicker was visible…</p>
<p><strong>Reflexion of the SPI signal/Missing terminator:</strong><br />
As the output of the Led module contains two 51Ohm resistors I guess this issue can be ignored.</p>
<p><strong>Use twisted-pair cable:</strong><br />
I want to avoid this point, as I already soldered the cables and connectors.</p>
<p><strong>Cable length:</strong><br />
Assuming a typical signal velocity of 5ns/m, a 11m cable will cause a propagation delay of 55ns. The full wavelength of a 1Mhz singal is 300m, for 8Mhz it’s 37.5m and for 16Mhz it’s 18.75m. So if I choose an SPI frequency of 1 or 2Mhz the wavelength can be ignored.</p>
<p><strong>Conclusion:</strong><br />
The problem still exists and I need more experimenting until this issue gets resolved. I test the installation with different SPI speed settings and need to test further.</p>
<p>Concrete next steps would be:</p>
<ul>
<li>Experiment with different “impedance” resistors. </li>
<li>add capacitor on each unit to clean DC (what capacity should be used? Elkos? Ceramic ones?)</li>
<li>Add termination resistor?</li>
</ul>
<p>I asked some clever people on <a href="http://www.reddit.com/r/AskEngineers/comments/qxnxu/electrical_engineers_of_reddit_question_about_spi/">Reddit </a>and on <a href="http://dangerousprototypes.com/forum/viewtopic.php?f=2&#038;t=3775">Dangerous Prototypes</a>, here are some promising answers:</p>
<ul>
<li><strong>flinxsl/reddit</strong>: At only 1MHz you can get away with a lot of approximation. It is a push-pull interface unlike I2C, so no termination pull up/pull down resistors are required.<br />
As others have mentioned, you should try looking at the signals with a scope, but be warned a probe can cause ringing that wouldn’t be there otherwise.</li>
<li><strong>Brian/dangerousprototypes</strong>: I know you say you want to avoid it but a good transmission line is needed for a long distance at a high speed.<br /> <br />Even your single wires are transmission lines they are just to a ground very far away. They are very inductive this way and that means very very slow.<br />The wavelength is shorter than you state, as your wavelength is assuming a impedance of free space and not of the transmission line you have. 100 Ohm is typical for twisted pair. 75 or 50 for coax. This means longer wavelengths as frequency does not change but the velocity is less.<br /> <br />Terminating a poorly defined non-transmission line with any impedance is does make a lot of sense to me. (If they aren’t twisted as the loop size changes the impedance will change).<br /> <br />Even without adding ground returns some progress can be made by twisting the 4 wires you have. I would twist the CLK line around GND and the data line around Vdd. Both GND and VDD are DC so from a transmission line viewpoint they are ground. If you have enough capacitance at each end it might be okay.<br /> <br />For reference, if you want long transmission the best thing would be differential buffers on each end, failing that single ended with ground returns for each line. Like a ribbon (IDE) cable or a CAT5 cable.</li>
<li><strong>Bertho/dangerousprototypes</strong>: …The capacity is normally what limits the clock frequency. Rule of thumb says you have 100nF per km of cable (may be worse or better; see cable docs). It takes a lot of energy to drive capacitive loads. You also have signal degradation due to cable resistance. If you get to higher frequencies, you will encounter coaxial properties of the cabling and then you must ensure that the driving impedance matches the loading impedance and the terminating impedance (all must be equal)…<br /> <br />The capacitance you need to add at the local tap’s power depends on the load current variations and the cable resistance. The impedance of the power supply lines increases as you add more cable and that means you need to decrease the impedance locally with a polarized capacitor (order of 10..1000uF). The ESR of the capacitor should be low. How low depends on the load current changes. A second capacitor is a ceramic of ~100nF to short the high frequencies.
<p>You may also want to add a ferrite bead at each tap’s power outtake. The effect of the inductance is that the rush-currents are damped and will not feed back as much. It also reduces the capacitance requirements at the local taps</li>
<li><strong>jwhat/reddit</strong>: So first piece of advice: if you have access to an oscilloscope, take a look at the data lines. Are they ringing? Are the signal levels too low?</li>
</ul>
<p><strong>Appendix:</strong><br />
The Arduino supports <strong>different SPI Speed</strong>:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Mode SPI Clock (Arduino Clock runns per default on 16Mhz):<br />
   SPI_CLOCK_DIV2 8 MHz<br />
   SPI_CLOCK_DIV4 4 MHz<br />
   SPI_CLOCK_DIV8 2 MHz<br />
   SPI_CLOCK_DIV16 1 MHz<br />
   SPI_CLOCK_DIV32 500 kHz<br />
   SPI_CLOCK_DIV64 250 kHz<br />
   SPI_CLOCK_DIV128 125 kHz</div></td></tr></tbody></table></div>
<p>A quote from the <strong>LPD6803 Datasheet</strong>:<br />
“Terminal is designed to push-pull strong drive circuit, after testing, it can <strong>drive 6meters length signal line when clock is 2M</strong>, to prevent signal echo, normally, pls serial a 50Ω resistance at DOUT and DCLKO, then output to next step.”. As you can see on the image, those resistors exists</p>
<p><strong>Various other quotes:</strong></p>
<p>With long lines and steep slopes, one has to use impedance matching at the ends of the lines. Without properly terminated lines there can be ringing, which is particulatly bad on the clk line. Once using terminated lines and resonable drivers there is <strong>not much need for repeaters in between, unless you really go over 100s of meters</strong>. [<a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&#038;file=viewtopic&#038;t=60979">src</a>]</p>
<p><strong>Add series or parallel termination ONLY to SPI clock signal</strong> to ensure clean edges. SPI clock edges must be clean, but SPI data does not have to be clean.  Reduce SPI clock frequency to allow SPI data signals to settle, meet setup time to SPI clock edges. Use a 33-ohm series term resistor only on SPI clock (SCLK) signal to ensure clean signal edges, and possibly reduce SPI clock frequency (if necessary) so that SPI data (in either direction) meet data -&gt; clock setup timing. [<a href="http://forums.xilinx.com/t5/General-Technical-Discussion/Resistor-termination-for-FPGA-to-SPI/td-p/160122">src</a>]</p>
<p>Used references:</p>
<ul>
<li><a href="http://www.nerdkits.com/videos/multipanel_spi_ledarray">http://www.nerdkits.com/videos/multipanel_spi_ledarray</a>/</li>
<li><a href="http://wiki.electronics-irc.net/Long_Distance_SPI">http://wiki.electronics-irc.net/Long_Distance_SPI</a></li>
<li><a href="http://www.ti.com/lit/an/slyt441/slyt441.pdf">http://www.ti.com/lit/an/slyt441/slyt441.pdf</a> (Extending the SPI bus for long-distance communication)</li>
<li><a href="http://www.ti.com/lit/an/slla142/slla142.pdf">http://www.ti.com/lit/an/slla142/slla142.pdf</a><br />
(Extending SPI and McBSP With DIfferential Interface Products)</li>
<li><a href="http://www.csgnetwork.com/freqwavelengthcalc.html">http://www.csgnetwork.com/freqwavelengthcalc.html</a></li>
<li><a href="http://www.ledstyles.de/ftopic18880.html">http://www.ledstyles.de/ftopic18880.html</a></li>
<li><a href="http://eetimes.com/design/embedded/4023975/Serial-Protocols-Compared">Serial Protocols Compared</a></li>
</ul>
<p><b>Signal Transmission</b><br />
Two common modes of transmission:</p>
<ul>
<li><strong>symmetrical</strong> / <a href="http://en.wikipedia.org/wiki/Differential_signaling">Differential signaling</a> (RS422, USB, Ethernet…) harder to implement, more wires (2n) but resistance to electromagnetic interference.</li>
<li><strong>asymmetrical</strong> / <a href="http://en.wikipedia.org/wiki/Single-ended_signalling">single-ended signaling</a> / unbalanced (RS232, I2C, SPI…), easy to implement, only n+1 wires but susceptible to interference.</li>
</ul>
<p><b>Cable Types</b><br />
<a href="http://en.wikipedia.org/wiki/Twisted_pair">Twisted pair</a> cables canceling out electromagnetic interference (EMI) from external sources. You can couple a AC with a DC signal (asymmetrical use case, for example V+ with Data and GND with Clock) or a AC with an AC signal (symmetrical use case, for example Data+ and Data-).</p>
<p> <br /> <br /> </p>
<p><strong>*** Edit 20.3.2012 ***</strong><br />
I created some reference shot with my DSO Quad, I used a Arduino UNO as board and my SPI firmware.</p>
<p>SPI 1MHz, Arduino SPI Output, Clock only:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/03/spi-1mhz-lpd6803-arduino-clockonly.png" alt="" title="spi-1mhz-lpd6803-arduino-clockonly" width="400" height="240" class="aligncenter size-full wp-image-1590" /></center></p>
<p>SPI 1MHz, Arduino SPI Output, Clock and Data (Strip.update):<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/03/spi-1mhz-lpd6803-arduino-update.png" alt="" title="spi-1mhz-lpd6803-arduino-update" width="400" height="240" class="aligncenter size-full wp-image-1591" /></center></p>
<p>SPI 1MHz, End of a 20 LED module strand, Clock only:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/03/spi-1mhz-lpd6803-end-of-strand-clockonly.png" alt="" title="spi-1mhz-lpd6803-end-of-strand-clockonly" width="400" height="240" class="aligncenter size-full wp-image-1592" /></center></p>
<p>SPI 1MHz, End of a 20 LED module strand, Clock and Data (Strip.update):<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/03/spi-1mhz-lpd6803-end-of-strand-update.png" alt="" title="spi-1mhz-lpd6803-end-of-strand-update" width="400" height="240" class="aligncenter size-full wp-image-1593" /></center></p>
<p>The signal at the end of 20 LED Modules does not look very clean, however the signal is NOT terminated.</p>
<p>Here is the simple code I used to measure:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#include &lt;TimerOne.h&gt;<br />
#include &lt;SPI.h&gt;<br />
#include “Neophob_LPD6803.h“<br />
<br />
#define LED_MODULES 200<br />
<br />
Neophob_LPD6803 strip = Neophob_LPD6803(LED_MODULES);<br />
<br />
void setup() {<br />
  strip.setCPUmax(60);<br />
  strip.begin();<br />
<br />
  for (int i=0; i &lt; strip.numPixels(); i++) {<br />
    strip.setPixelColor(i, 0x7fff03); //White<br />
  }<br />
  strip.show();<br />
}<br />
<br />
void loop() {<br />
  //strip.show();  //enable this line to send data<br />
}</div></td></tr></tbody></table></div>
<p>Description of the LPD6803 timing sequence:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/03/lpd6803-timingsequence.png" alt="" title="lpd6803-timingsequence" width="519" height="254" class="aligncenter size-full wp-image-1627" /></center></p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2012/03/lpd6803-spi-and-long-distance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cheat Sheet: Java Debugging</title>
		<link>http://neophob.com/2012/03/cheat-sheet-java-debugging/</link>
		<comments>http://neophob.com/2012/03/cheat-sheet-java-debugging/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 08:56:52 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Cheat Sheet]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JDK]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1450</guid>
		<description><![CDATA[This is my cheat sheet I use whenever I had to debug a Java application. jps, get PID of a running Java process: 1234localhost bin # jps 22763 Jps 9771 Bootstrap 2275 Startup    jmap, create memory dumps from a running process. Example, get PermGen statistics from a running process (if you need to debug [...]]]></description>
			<content:encoded><![CDATA[<p>This is my cheat sheet I use whenever I had to debug a Java application.</p>
<p><strong>jps</strong>, get PID of a running Java process:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">localhost bin # jps<br />
22763 Jps<br />
9771 Bootstrap<br />
2275 Startup</div></td></tr></tbody></table></div>
<p> <br /> <br />
<strong>jmap</strong>, create memory dumps from a running process.<br />
Example, get <strong>PermGen</strong> statistics from a running process (if you need to debug some nasty java.lang.OutOfMemoryError: PermGen space errors):</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">localhost bin # jmap –permstat 9771 &gt; AA7<br />
Attaching to process ID 9771, please wait…<br />
Debugger attached successfully.<br />
Server compiler detected.<br />
JVM version is 17.0-b16<br />
finding class loader instances ..Finding object size using Printezis bits and skipping over…<br />
Finding object size using Printezis bits and skipping over…<br />
Finding object size using Printezis bits and skipping over…<br />
done.<br />
computing per loader stat ..done.<br />
please wait.. computing liveness.….….….….….….….….….….….….….….….….….….….….….….…done.</div></td></tr></tbody></table></div>
<p>Example, get a <strong>heap dump</strong> from process:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">localhost bin # jmap –F –dump:format=b,file=heap.bin 9771<br />
Attaching to process ID 9771, please wait…<br />
Debugger attached successfully.<br />
Server compiler detected.<br />
JVM version is 17.0-b16<br />
Dumping heap to heap.bin …<br />
Finding object size using Printezis bits and skipping over…<br />
Finding object size using Printezis bits and skipping over…<br />
Finding object size using Printezis bits and skipping over…<br />
Finding object size using Printezis bits and skipping over…<br />
Finding object size using Printezis bits and skipping over…<br />
Heap dump file created</div></td></tr></tbody></table></div>
<p> <br /> <br />
<strong><a href="http://docs.oracle.com/javase/1.5.0/docs/tooldocs/share/jstat.html">jstat</a></strong>, display real time information of a Java process:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">localhost bin # jstat –gcpermcapacity 9771 2000 2000<br />
  PGCMN      PGCMX       PGC         PC      YGC   FGC    FGCT     GCT<br />
   16384.0    65536.0    57216.0    57216.0 30443 15993 3731.017 4073.695<br />
   16384.0    65536.0    57216.0    57216.0 30445 15994 3731.017 4073.720<br />
   16384.0    65536.0    57216.0    57216.0 30445 15994 3731.268 4073.971</div></td></tr></tbody></table></div>
<p> <br /> <br />
<strong>jstack</strong>, prints Java stack traces of Java threads for a given Java process or core file or a remote debug server, example:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">localhost bin # ./jps<br />
19953 Jps<br />
4176 Restart<br />
2247 Bootstrap<br />
localhost bin # ./jstack 4176<br />
2012-03-13 13:22:16<br />
Full thread dump Java HotSpot™ Server VM (17.0-b16 mixed mode):<br />
<br />
“Attach Listener” daemon prio=10 tid=0x08158800 nid=0x4e0d runnable [0x00000000]<br />
   java.lang.Thread.State: RUNNABLE<br />
<br />
“pool-1-thread-50″ prio=10 tid=0x080e0000 nid=0x13b8 waiting on condition [0x8d05c000]<br />
   java.lang.Thread.State: TIMED_WAITING (parking)<br />
        at sun.misc.Unsafe.park(Native Method)<br />
        — parking to wait for  &lt;0x94161ef8&gt; (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)<br />
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)<br />
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)<br />
        at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)<br />
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:583)<br />
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:576)<br />
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)<br />
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)<br />
        at java.lang.Thread.run(Thread.java:619)<br />
<br />
… more log</div></td></tr></tbody></table></div>
<p> <br /> <br />
<strong>Histogram</strong> print histogram of java object heap, example:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># ./jmap –F –histo 4176<br />
Object Histogram:<br />
<br />
num       #instances    #bytes  Class description<br />
————————————————————————–<br />
1:      140465  19363672    * ConstMethodKlass<br />
2:      29609   16513608    byte[]<br />
3:      151552  14608368    char[]<br />
4:      140465  11244104    * MethodKlass<br />
5:      42727   9011984 int[]<br />
6:      12043   7465408 * ConstantPoolKlass<br />
7:      142782  6064992 * SymbolKlass<br />
8:      12043   5343816 * InstanceKlassKlass<br />
9:      9962    4464928 * ConstantPoolCacheKlass<br />
10:     170685  4096440 java.lang.String<br />
11:     5044    1843192 * MethodDataKlass<br />
12:     61593   1478232 java.util.HashMap$Entry <br />
…</div></td></tr></tbody></table></div>
<p> <br /> <br />
<a href="http://visualvm.java.net/">Java VisualVM</a>, a nice frontend that can be used to load dump files you created with the jmap tool. This tool also allows you to monitor your application (Heap, Permgen space, CPU, Threads, Classes).</p>
<p> <br /> <br />
If you need more information, make sure to check out <a href="http://java.sun.com/developer/technicalArticles/J2SE/monitoring/">this technical article at java.sun.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2012/03/cheat-sheet-java-debugging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StripInvaders DIY Project Box</title>
		<link>http://neophob.com/2012/02/stripinvaders-diy-project-box/</link>
		<comments>http://neophob.com/2012/02/stripinvaders-diy-project-box/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 21:05:15 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Feature]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[StripInvaders]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1435</guid>
		<description><![CDATA[I was looking for a nice project box for my StripInvaders project. But either the box was ugly, too expensive or too small. Luckily I found this website: http://boxmaker.rahulbotics.com/. Their slogan is: Give us dimensions, and we’ll generate a PDF you can use to cut a notched box on a laser-cutter The final models were [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a nice project box for my <a href="http://pixelinvaders.ch/?page_id=396">StripInvaders</a> project. But either the box was ugly, too expensive or too small. Luckily I found this website: <a href="http://boxmaker.rahulbotics.com/">http://boxmaker.rahulbotics.com/</a>. Their slogan is:</p>
<blockquote><p>Give us dimensions, and we’ll generate a PDF you can use to cut a notched box on a laser-cutter</p></blockquote>
<p>The final models were laser cutted by <a href="http://www.3d-model.ch/">http://www.3d-model.ch/</a>, the result is great, take a look at the results:<br />
<center><br />
<img src="http://neophob.com/wp-content/uploads/2012/02/IMG_20120208_200731-1024x768.jpg" alt="" title="StripInvaders Project Box" width="385" height="288" class="aligncenter size-large wp-image-1438" /><br />
<img src="http://neophob.com/wp-content/uploads/2012/02/IMG_20120208_194532-1024x768.jpg" alt="" title="StripInvaders Project Box" width="385" height="288" class="aligncenter size-large wp-image-1441" /><br />
<img src="http://neophob.com/wp-content/uploads/2012/02/IMG_20120208_200852-1024x768.jpg" alt="" title="StripInvaders case" width="385" height="288" class="aligncenter size-large wp-image-1439" /><br />
<img src="http://neophob.com/wp-content/uploads/2012/02/IMG_20120209_212028-1024x768.jpg" alt="" title="SAMSUNG" width="385" height="288" class="aligncenter size-large wp-image-1444" /><br />
</center></p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2012/02/stripinvaders-diy-project-box/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>StripInvaders Howto Assemble</title>
		<link>http://neophob.com/2012/01/stripinvaders-howto-assemble/</link>
		<comments>http://neophob.com/2012/01/stripinvaders-howto-assemble/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 20:30:40 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[OSC]]></category>
		<category><![CDATA[PixelInvaders]]></category>
		<category><![CDATA[PureData]]></category>
		<category><![CDATA[StripInvaders]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1412</guid>
		<description><![CDATA[This Guide shows you, how to assemble/connect the StripInvaders System. You need: WS2801 LED Strips An Arduino Ethernet Board and a USB/Serial Light Adapter to upload the firmware 5 Volt power supply – I use an old ATX Power supply Optional: Grove — Base Shield and Cables Also make sure that the StripInvaders Sketch is [...]]]></description>
			<content:encoded><![CDATA[<p>This Guide shows you, how to assemble/connect the <a href="http://pixelinvaders.ch/?page_id=396">StripInvaders System</a>. You need:</p>
<ul>
<li><a href="http://pixelinvaders.ch/?page_id=390">WS2801 LED Strips</a></li>
<li>An Arduino Ethernet Board and a USB/Serial Light Adapter to upload the firmware</li>
<li>5 Volt power supply – I use an old ATX Power supply </li>
<li>Optional: Grove — Base Shield and Cables</li>
</ul>
<p>Also make sure that the <a href="https://github.com/neophob/StripInvaders">StripInvaders Sketch</a> is already on your Arduino!</p>
<p>This is my WS2801 LED Strip:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/01/ws2801.jpg" alt="" title="ws2801" width="500" height="387" class="aligncenter size-full wp-image-1384" /></center><br />
You see that the connections described on the Strip itself (<strong>Black</strong>: 5V, <strong>Green</strong>: Clock, <strong>Red</strong>: Data, <strong>Blue</strong>: GND).</p>
<p>Now it’s time to connect the <a href="http://www.seeedstudio.com/depot/grove-base-shield-p-754.html">Grove Base Shield</a> to the Arduino Ethernet:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/01/arduinoEth.png" alt="" title="arduinoEth" width="500" height="366" class="aligncenter size-full wp-image-1385" /></center><br />
The Grove Cable is connected at Port nr. 4, this means <strong>Yellow</strong>: D4, <strong>White</strong>: D5, <strong>Red</strong>: V+, <strong>Black</strong>: GND. Hint: D4 means Arduino Digital Pin 4, D5 means Arduino Digital Pin 5.</p>
<p>Almost done, now connect the cable from the Arduino <strong>Grove Shield</strong> with the <strong>LED Strip</strong> and the <strong>5V power supply</strong>. This should look like this:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/01/StripInvadersFritz.png" alt="" title="StripInvadersFritz" width="495" height="591" class="aligncenter size-full wp-image-1400" /></center></p>
<p>Now connect the StripInvader to your LAN and power up StripInvaders. Try to ping the host “invader.local”, this is the mDNS name of the StripInvaders Arduino device. </p>
<p>The StripInvaders can be configured without re-uploading the Arduino sketch, by sending a special OSC messages (/cfg). Take a look at this <a href="http://puredata.info/">PureData</a> example:<br />
<center><img src="http://neophob.com/wp-content/uploads/2012/01/stripinvadersSetup.png" alt="" title="stripinvadersSetup" width="414" height="614" class="aligncenter size-full wp-image-1406" /></center></p>
<p>In our example we send “/cfg 66 5 4 96″. The <strong>first parameter</strong> 66 is just a magic byte, it must be 66, period. The <strong>second parameter</strong> defines the data pin, the <strong>third parameter</strong> defines the clock pin and the <strong>last parameter</strong> define how many led pixels are installed.</p>
<p>Links: <a href="http://pixelinvaders.ch/?page_id=396">StripInvaders System</a></p>
<p>Look, it’s really easy ma:<br /><object width="520" height="290"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=35978973&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=35978973&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="520" height="290"></embed></object></p>
<p><strong>Edit 4.2.2012:</strong><br />
I just released the <a href="https://github.com/neophob/StripInvaders/downloads">StripInvaders config Tool</a> (for OSX and Windows), this should simplify the setup process. Here is a screenshot:<br />
<img src="http://neophob.com/wp-content/uploads/2012/01/StripInvaderConfig.png" alt="" title="StripInvaderConfig" width="628" height="402" class="aligncenter size-full wp-image-1433" /></p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2012/01/stripinvaders-howto-assemble/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>StripInvaders Light System</title>
		<link>http://neophob.com/2011/12/stripinvaders-light-system/</link>
		<comments>http://neophob.com/2011/12/stripinvaders-light-system/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 22:01:47 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Feature]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Led]]></category>
		<category><![CDATA[OSC]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1363</guid>
		<description><![CDATA[I just released a new project called StripInvaders. It’s basically a PixelInvaders in one dimension. StripInvaders drives a 5m long LED strip and display some fancy animation. I use a Arduino Ethernet as driver, so no external hardware is used. Some features of StripInvaders: 15 different color modes Control StripInvaders with a Smartphone or Tablet [...]]]></description>
			<content:encoded><![CDATA[<p>I just released a new project called <strong>StripInvaders</strong>. It’s basically a PixelInvaders in one dimension. StripInvaders drives a 5m long LED strip and display some fancy animation. I use a <a href="http://arduino.cc/en/Main/ArduinoBoardEthernet">Arduino Ethernet</a> as driver, so no external hardware is used. Some features of StripInvaders:</p>
<ul>
<li>15 different color modes</li>
<li>Control StripInvaders with a Smartphone or Tablet</li>
<li>Stepless adjust the RGB value and the animation delay</li>
<li>Bonjour and mDNS support</li>
<li>DHCP support</li>
<li>All fits into the 30kb firmware</li>
<li>The firmware is released on <a href="https://github.com/neophob/StripInvaders">GitHub</a></li>
<li>Strips available on my <a href="http://pixelinvaders.ch/?page_id=390">PixelInvaders.ch shop</a></li>
</ul>
<p>StripInvaders will color up your flat, take a look at those images:<br />
<center><br />
<img src="http://neophob.com/wp-content/uploads/2011/12/GOPR1289-1024x768.jpg" alt="" title="StripInvaders" width="385" height="288" class="aligncenter size-large wp-image-1364" /></p>
<p><img src="http://neophob.com/wp-content/uploads/2011/12/GOPR1288-1024x768.jpg" alt="" title="StripInvaders BlueRed" width="385" height="288" class="aligncenter size-large wp-image-1369" /></p>
<p><img src="http://neophob.com/wp-content/uploads/2011/12/GOPR1296-1024x768.jpg" alt="" title="DCIM100GOPRO" width="385" height="288" class="aligncenter size-large wp-image-1376" /></p>
<p><img src="http://neophob.com/wp-content/uploads/2011/12/GOPR1353-1024x768.jpg" alt="" title="DCIM100GOPRO" width="385" height="288" class="aligncenter size-large wp-image-1377" /><br />
</center></p>
<p><object width="520" height="290"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=33992255&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=33992255&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="520" height="290"></embed></object><br />
<br /> </p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/12/stripinvaders-light-system/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Use BusPirate to upload Sketch to Arduino Ethernet</title>
		<link>http://neophob.com/2011/12/use-buspirate-to-upload-sketch-to-arduino-ethernet/</link>
		<comments>http://neophob.com/2011/12/use-buspirate-to-upload-sketch-to-arduino-ethernet/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 09:01:21 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Buspirate]]></category>
		<category><![CDATA[Ethernet]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1358</guid>
		<description><![CDATA[I just got a new Arduino Ethernet board and had some troubles uploading the Firmware. After some research I finally found a solution using my BusPirate v3: Here is the wiring between BusPirate and Arduino Ethernet BP GND -&#62; Pin 1 (Black) BP 5v -&#62; Pin 3 (Red) BP MOSI -&#62; Pin 4 (Red) BP [...]]]></description>
			<content:encoded><![CDATA[<p>I just got a new Arduino Ethernet board and had some troubles uploading the Firmware. After some research I finally found a solution using my <strong>BusPirate </strong>v3:</p>
<p><center><img src="http://neophob.com/wp-content/uploads/2011/12/IMG_20111202_095024-768x1024.jpg" alt="" title="ARduinoEthernet" width="385" height="513" class="aligncenter size-large wp-image-1359" /></center></p>
<p>Here is the wiring between BusPirate and Arduino Ethernet<br />
BP GND -&gt; Pin 1 (Black)<br />
BP 5v -&gt; Pin 3 (Red)<br />
BP MOSI -&gt; Pin 4 (Red)<br />
BP MISO -&gt; Pin 5 (Yellow)<br />
BP CLK -&gt; Pin 6 (Blue)</p>
<p>Connect to your BusPirate (115200 BPS) and configure it to run in transparent serial mode</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">HiZ&gt;m<br />
1. HiZ<br />
2. 1-WIRE<br />
3. UART<br />
4. I2C<br />
5. SPI<br />
6. JTAG<br />
7. RAW2WIRE<br />
8. RAW3WIRE<br />
9. PC KEYBOARD<br />
10. LCD<br />
(1) &gt;3<br />
Mode selected<br />
Set serial port speed: (bps)<br />
 1. 300<br />
 2. 1200<br />
 3. 2400<br />
 4. 4800<br />
 5. 9600<br />
 6. 19200<br />
 7. 38400<br />
 8. 57600<br />
 9. 115200<br />
 10. 31250 (MIDI)<br />
(1) &gt;9<br />
Data bits and parity:<br />
 1. 8, NONE *default<br />
 2. 8, EVEN<br />
 3. 8, ODD<br />
 4. 9, NONE<br />
(1) &gt;<br />
Stop bits:<br />
 1. 1 *default<br />
 2. 2<br />
(1) &gt;<br />
Receive polarity:<br />
 1. Idle 1 *default<br />
 2. Idle 0<br />
(1) &gt;<br />
Select output type:<br />
 1. Open drain (H=Hi-Z, L=GND)<br />
 2. Normal (H=3.3V, L=GND)<br />
(1) &gt;2<br />
READY<br />
UART&gt;W<br />
POWER SUPPLIES ON<br />
HiZ&gt;I<br />
Bus Pirate v3<br />
Firmware v4.2 Bootloader v4.1<br />
DEVID:0x0447 REVID:0x3043 (B5)<br />
http://dangerousprototypes.com<br />
UART&gt;(3)<br />
UART bridge. Space continues, anything else exits.<br />
Reset to exit.</div></td></tr></tbody></table></div>
<p>Exit the Terminal and switch over to your Arduino IDE. Now upload your sketch through the BusPirate.</p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/12/use-buspirate-to-upload-sketch-to-arduino-ethernet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PixelController Showcase Video: OSC</title>
		<link>http://neophob.com/2011/11/pixelcontroller-showcase-video-osc/</link>
		<comments>http://neophob.com/2011/11/pixelcontroller-showcase-video-osc/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 18:36:26 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[OSC]]></category>
		<category><![CDATA[PixelController]]></category>
		<category><![CDATA[PixelInvaders]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1341</guid>
		<description><![CDATA[PixelController gets better and better and I’ve even managed to create a Video showing the OSC Gui on my Xoom tablet. I’m using the Control Application by Charlie Roberts in my Video: Oh and if you’re asking yourself, where the OSC Gui definitions are, check this link.]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/neophob/PixelController">PixelController</a> gets better and better and I’ve even managed to create a Video showing the OSC Gui on my Xoom tablet. I’m using the <a href="http://charlie-roberts.com/Control/">Control Application by Charlie Roberts</a> in my Video:</p><object width="520" height="290"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=32580251&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=32580251&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="520" height="290"></embed></object><p>Oh and if you’re asking yourself, where the OSC Gui definitions are, <a href="https://github.com/neophob/PixelController/blob/master/data/OSC/002.js">check this link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/11/pixelcontroller-showcase-video-osc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSD Disk AGILITY3 on MacBook, Link Speed issues</title>
		<link>http://neophob.com/2011/11/ssd-disk-agility3-on-macbook-link-speed-issues/</link>
		<comments>http://neophob.com/2011/11/ssd-disk-agility3-on-macbook-link-speed-issues/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 17:42:03 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Mac OSX hints]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[OCZ]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[SATA]]></category>
		<category><![CDATA[SSD]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1331</guid>
		<description><![CDATA[I own a Macbook (End 2008, MacBook5,1) and after I updated from Snow Leopard to Lion my System getting slower and slower. Thats why I wanted to replace my old HDD with a fancy new SSD disk. I bought a OCZ-AGILITY3 (Firmware 2.13) SSD Disk. I created a OSX Lion Boot DVD (re-downloaded it from [...]]]></description>
			<content:encoded><![CDATA[<p>I own a Macbook (End 2008, MacBook5,1) and after I updated from Snow Leopard to Lion my System getting slower and slower. Thats why I wanted to replace my old HDD with a fancy new SSD disk. I bought a OCZ-AGILITY3 (Firmware 2.13) SSD Disk. </p>
<p>I created a OSX Lion Boot DVD (<a href="http://osxdaily.com/2011/08/02/re-download-mac-os-x-lion-from-app-store/">re-downloaded it from the App Store</a>) to reinstall OSX.<br />
After swapping the disks I pressed the <strong>d</strong> key to boot from DVD. 25 Minutes later my OSX Lion was reinstalled, time to do some tweaks to <a href="http://poller.se/2010/08/optimizing-mac-os-x-for-ssd-drives/">optimize OSX for SSD drivers</a>.</p>
<p>I installed some tools and noticed that the system was faster, but not THAT faster. In the System information view I saw that the negotiated SATA Link Speed was only 1.5Gbps (SATA1), however my NVidia MCP79 Controller should support 3Gbps (SATA2). After some research I found <a href="http://www.ocztechnologyforum.com/forum/showthread.php?96106-Macbook-users-with-1.5Gb-s-link-instead-of-3Gb-s-link&#038;p=695128&#038;viewfull=1#post695128">the solution for the SATA 1.5 Link issue</a> in a OCZ support forum. I downloaded an ISO image from <a href="https://rapidshare.com/files/892490026/OCZ_MAC.zip">Rapidshare</a> (!!) and patched my SSD drive. The result was very impressive! My boot time is less than 15s and man, I never saw the Eclipse IDE start so fast.</p>
<p>I used <a href="http://www.xbench.com/">XBench</a> to create some Benchmarks. I created some benchmark with <a href="http://db.xbench.com/merge.xhtml?doc1=558611&#038;doc2=558541">1.5Gbps link (blue) and with the 3.0Gbps link (red), see yourself</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/11/ssd-disk-agility3-on-macbook-link-speed-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Maven 3 is evil</title>
		<link>http://neophob.com/2011/11/maven-3-is-evil/</link>
		<comments>http://neophob.com/2011/11/maven-3-is-evil/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 23:06:21 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[mvn]]></category>
		<category><![CDATA[sonatype]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1320</guid>
		<description><![CDATA[After I reinstalled my MacBook on my brand new SSD disk, I discovered that maven v3.0.3 was installed with the Java bundle. I tried to build PixelController which was working fine using maven v2.1.x. Of course, compiling failed now using maven v3.0.3: 12345678910111213[WARNING] The POM for compartmental.net:minim-spi:jar:2.0.2 is missing, no dependency information available [WARNING] The [...]]]></description>
			<content:encoded><![CDATA[<p>After I reinstalled my MacBook on my brand new SSD disk, I discovered that maven v3.0.3 was installed with the Java bundle. I tried  to build <a href="https://github.com/neophob/PixelController">PixelController</a> which was working fine using maven v2.1.x. Of course, compiling failed now using maven v3.0.3:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[WARNING] The POM for compartmental.net:minim-spi:jar:2.0.2 is missing, no dependency information available<br />
[WARNING] The POM for compartmental.net:tritonus_aos:jar:2.0.2 is missing, no dependency information available<br />
[WARNING] The POM for compartmental.net:tritonus_share:jar:2.0.2 is missing, no dependency information available<br />
[WARNING] The POM for com.neophob:processing-blinkenlight:jar:0.5 is missing, no dependency information available<br />
[WARNING] The POM for artnet4j:artnet4j:jar:0001 is missing, no dependency information available<br />
[INFO] ————————————————————————<br />
[INFO] BUILD FAILURE<br />
[INFO] ————————————————————————<br />
[INFO] Total time: 1.344s<br />
[INFO] Finished at: Tue Nov 15 23:36:35 CET 2011<br />
[INFO] Final Memory: 4M/81M<br />
[INFO] ————————————————————————<br />
[ERROR] Failed to execute goal on project PixelController: Could not resolve dependencies for project neophob.com:PixelController:jar:1.1.1-SNAPSHOT: The following artifacts could not be resolved: net.sourceforge.jargs:jargs:jar:1.0, org.processing:core:jar:1.2.1, org.processing:net:jar:1.2.1, org.processing:pde:jar:1.2.1, org.processing:serial:jar:1.2.1, org.qbang:rxtx:jar:2.2pre5, compartmental.net:minim:jar:2.0.2, compartmental.net:jsminim:jar:2.0.2, compartmental.net:minim-spi:jar:2.0.2, compartmental.net:tritonus_aos:jar:2.0.2, compartmental.net:tritonus_share:jar:2.0.2, com.neophob:processing-blinkenlight:jar:0.5, artnet4j:artnet4j:jar:0001: Failure to find net.sourceforge.jargs:jargs:jar:1.0 in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.java.net has elapsed or updates are forced -&gt; [Help 1]</div></td></tr></tbody></table></div>
<p>I use the maven-instal-plugin to deploy some I-did-not-find-them-in-public-repos libraries, the pom.xml looks like this:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">            &lt;plugin&gt;<br />
                &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br />
                &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;<br />
                &lt;version&gt;2.3.1&lt;/version&gt;<br />
                &lt;executions&gt;<br />
                    &lt;execution&gt;<br />
                        &lt;id&gt;blinkenlights.jar&lt;/id&gt;<br />
                        &lt;configuration&gt;<br />
                            &lt;file&gt;lib/blinkenlights.jar&lt;/file&gt;<br />
                            &lt;groupId&gt;com.neophob&lt;/groupId&gt;<br />
                            &lt;artifactId&gt;processing-blinkenlight&lt;/artifactId&gt;<br />
                            &lt;version&gt;0.5&lt;/version&gt;<br />
                            &lt;packaging&gt;jar&lt;/packaging&gt;<br />
                        &lt;/configuration&gt;<br />
                        &lt;phase&gt;initialize&lt;/phase&gt;<br />
                        &lt;goals&gt;<br />
                            &lt;goal&gt;install-file&lt;/goal&gt;<br />
                        &lt;/goals&gt;<br />
                    &lt;/execution&gt;</div></td></tr></tbody></table></div>
<p>Now long story short I found a bug entry on <a href="http://jira.codehaus.org/browse/MNG-5087">jira</a> which was not directly<br />
related to my issue. However due lack of options I thought lets update the <a href="http://aether.sonatype.org/">aether</a> libraries on my system. Maven v3.0.3 uses v1.11 while v1.13 is currently the latest version. Delete all v1.11 jar files and replace’em with a v1.13. Now maven works as it should. Or wait for Maven v3.0.4…</p>
<p>Aether binaries: <a href="http://repo1.maven.org/maven2/org/sonatype/aether/">http://repo1.maven.org/maven2/org/sonatype/aether/</a><br />
OSX Maven v3.0.3 library path: /usr/share/java/maven-3.0.3/lib</p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/11/maven-3-is-evil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PixelController — Universal OpenSource Light Control Solution</title>
		<link>http://neophob.com/2011/09/pixelcontroller-universal-opensource-light-control-solution/</link>
		<comments>http://neophob.com/2011/09/pixelcontroller-universal-opensource-light-control-solution/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 19:44:33 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PixelController]]></category>
		<category><![CDATA[PixelInvaders]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1219</guid>
		<description><![CDATA[PixelController is a real time video/VJ generator and mixer software. Most of the Visuals are generated and mixed in realtime and respond to the environment. I use PixelController to control my PixelInvaders Panels. PixelController supports well-known industry and OpenSource standards, such as Art-Net, Mini-DMX, LPD6803 and Seeedstudio’s Rainbowduino. It is quite simple to support more [...]]]></description>
			<content:encoded><![CDATA[<p><strong>PixelController</strong> is a real time video/VJ generator and mixer software. Most of the Visuals are generated and mixed in realtime and respond to the environment. I use PixelController to control my <a href="http://neophob.com/2011/08/pixelinvaders-3d-rgb-led-panels/">PixelInvaders</a> Panels.</p>
<p><strong>PixelController</strong> supports well-known industry and OpenSource standards, such as Art-Net, Mini-DMX, LPD6803 and Seeedstudio’s Rainbowduino. It is quite simple to support more standards protocols like WS2801, HL1606 etc. </p>
<p>If the <strong>PixelController</strong> software is launched, two windows are displayed. The first window shows the internal debug buffer while the second shows the simulated output matrix.</p>
<p>The <strong>internal imagebuffer</strong> in this example shows three different visuals. The number of visuals displayed corresponds to the configured output:<br />
<center><img src="http://neophob.com/wp-content/uploads/2011/09/PixelControllerBufferX.png" alt="" title="PixelControllerBuffer2" class="alignnone size-full wp-image-1269" /></center></p>
<p>The <strong>simulated output matrix</strong> window shows the first Visual stretched over two matrices:<br />
<center><img src="http://neophob.com/wp-content/uploads/2011/09/PixelControllerMatrixX.png" alt="" title="PixelControllerMatrix" class="alignnone size-full wp-image-1258" /></center></p>
<p>There are different possibilities to control PixelController, one of them is the <strong>PureData frontend</strong>:<br />
<center><img src="http://neophob.com/wp-content/uploads/2011/09/PixelControllerGuiX.png" alt="" title="PixelControllerGui" class="alignnone size-full wp-image-1263" /></center></p>
<p>Another possibility to control PixelController, using the <strong>simple TCP protocol</strong> with NetCat:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#  nc 127.0.0.1 3448<br />
RANDOMIZE;<br />
CHANGE_TINT 31 33 7;<br />
CHANGE_ALL_OUTPUT_EFFECT 3;<br />
CHANGE_ALL_OUTPUT_VISUAL 1;</div></td></tr></tbody></table></div>
<p> <br /> <br /> </p>
<blockquote><p>How to get PixelController?</p></blockquote>
<p>PixelController is hosted on GitHub, so</p>
<ul>
<li><a href="https://github.com/neophob/PixelController">Browse the Source</a></li>
<li>or download a <a href="https://github.com/downloads/neophob/PixelController/PixelController-1.0.3.zip">version 1.0.3</a></li>
<li>or check <a href="http://pixelinvaders.ch">PixelInvaders Website</a> for more information</li>
</ul>
<p> <br /> <br /> </p>
<blockquote><p>Technical Specs</p></blockquote>
<p>More information about PixelController.<br />
<strong>Generators:</strong></p>
<ul>
<li>Blinkenlights Movie Player</li>
<li>Image Viewer</li>
<li>Simple Plasma</li>
<li>Simple Colors</li>
<li>Fire</li>
<li>Metaballs</li>
<li>Pixelimage</li>
<li>Texture Deformation</li>
<li>Textwriter</li>
<li>Image zoomer</li>
<li>Cell</li>
<li>Plasma Two</li>
<li>FFT</li>
<li>Bubble</li>
</ul>
<p><strong>Effects:</strong></p>
<ul>
<li>Inverter</li>
<li>Rotozoomer</li>
<li>Horizontal Beat Shifter</li>
<li>Vertical Beat Shifter</li>
<li>Voluminize</li>
<li>Tine</li>
<li>Threshold</li>
<li>Emboss</li>
</ul>
<p><strong>Mixer:</strong></p>
<ul>
<li>Add Saturation</li>
<li>Multiply</li>
<li>Mix</li>
<li>Negative Multiply</li>
<li>Checkbox</li>
<li>Voluminizer</li>
<li>Xor</li>
<li>Minus Half</li>
<li>Either</li>
</ul>
<p><strong>Fader:</strong></p>
<ul>
<li>Switch</li>
<li>Crossfade</li>
<li>Slide Upside Down</li>
<li>Slide Left Right</li>
</ul>
<p><strong>Resizer:</strong></p>
<ul>
<li>Pixel Resizer</li>
<li>Quality Resizer</li>
</ul>
<p><strong>How to control the Software:</strong></p>
<ul>
<li>PureData Frontend</li>
<li>OSC Server/Client</li>
<li>MIDI Device/Signal</li>
<li>Command Line Interface</li>
<li>Simple TCP Interface</li>
<li>Audio input</li>
</ul>
<p><strong>Operation Mode:</strong></p>
<ul>
<li>Manual</li>
<li>Automatic aka. Randomizer</li>
<li> Predefined settings </li>
</ul>
<p><strong>Supported Operating Systems:</strong></p>
<ul>
<li>Microsoft Windows</li>
<li>Apple OSX</li>
<li>Linux</li>
<li>Every OS that supports a JRE</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/09/pixelcontroller-universal-opensource-light-control-solution/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>PixelInvaders 3D RGB LED Panels</title>
		<link>http://neophob.com/2011/08/pixelinvaders-3d-rgb-led-panels/</link>
		<comments>http://neophob.com/2011/08/pixelinvaders-3d-rgb-led-panels/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 19:46:36 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Midi]]></category>
		<category><![CDATA[OSC]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[teensy]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1189</guid>
		<description><![CDATA[After several month of working on my PixelInvaders 3D RGB Panels I finally reached my goal: a huge and easy to assemble RGB LED Panel. Besides the hardware, the control software was a big task. I created PixelController, a modular software written in Java and released as OpenSource on GitHub. The frontend is written as [...]]]></description>
			<content:encoded><![CDATA[<p>After several month of working on my <strong>PixelInvaders 3D RGB Panels</strong> I finally reached my goal: a huge and easy to assemble RGB LED Panel.</p>
<p>Besides the hardware, the control software was a big task. I created PixelController, a modular software written in Java and released as <strong>OpenSource</strong> on GitHub.<br />
The frontend is written as a PureData Sketch. That means you can easily adapt the frontend and use <strong>OSC applications</strong> (like TouchOSC) or <strong>Midi devices</strong> (like Akai MPD26) to control the software.</p>
<p>Here’s a picture of two PixelInvaders panels, controlled by an Akai MPD26:<br />
<center><img src="http://neophob.com/wp-content/uploads/2011/08/f1540224.jpg" alt="" title="Two PixelInvaders Panels in action" width="550" height="825" class="alignnone size-full wp-image-1194" /><br />
</center></p>
<p>Two PixelInvaders Panels in action:<br /><object width="520" height="290"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=27453711&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=27453711&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="520" height="290"></embed></object></p>
<p>More information / Links:</p>
<ul>
<li>I set up the project site at <a href="http://www.pixelinvaders.ch">»www.pixelinvaders.ch</a></li>
<li>The <a href="https://github.com/neophob/PixelController">»PixelController project on GitHub</a></li>
<li>I you need such a panel (and who does not?) you can easily <a href="http://igg.me/p/31640?a=167555&#038;i=shlk">»get one at my IndieGOGO campaign</a></li>
</ul>
<p>
<center><img src="http://neophob.com/wp-content/uploads/2011/08/IMG_1932-1024x682.jpg" alt="" title="PixelInvaders" width="385" height="256" class="aligncenter size-large wp-image-1190" /></center></p>
<blockquote><p>Spread the word, I need support for my Indiegogo campaign!</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/08/pixelinvaders-3d-rgb-led-panels/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LPD6803 Tutorial, Part 2: Simple VU Meter</title>
		<link>http://neophob.com/2011/06/lpd6803-tutorial-part-2-simple-vu-meter/</link>
		<comments>http://neophob.com/2011/06/lpd6803-tutorial-part-2-simple-vu-meter/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 20:46:55 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Led]]></category>
		<category><![CDATA[LPD6803]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1120</guid>
		<description><![CDATA[Make sure you read Part 1 of this tutorial. In this tutorial we use a strand of 20 LPD6803 RGB LED as huge VU Meter. Processing will send serial data to the Arduino which will display it.     The source can be found on my GitHub site. Check out my PixelInvaders Shop if you [...]]]></description>
			<content:encoded><![CDATA[<p>Make sure you read <a href="http://neophob.com/2011/06/lpd6803-tutorial-part-1-basics/">Part 1 of this tutorial</a>.</p>
<p>In this tutorial we use a strand of 20 LPD6803 RGB LED as huge VU Meter. <a href="http://processing.org/">Processing</a> will send serial data to the Arduino which will display it.</p>
<p> <br />
<img class="alignnone size-full wp-image-1179" title="DIY-VU-Meter" src="http://neophob.com/wp-content/uploads/2011/06/DIY-VU-Meter.png" alt="" width="322" height="498" /><br />
 </p>
<p>The source can be found on <a href="https://github.com/neophob/LPD6803-RGB-Pixels/tree/master/examples/vumeter">my GitHub site</a>.</p><object width="520" height="290"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=25734660&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=25734660&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="520" height="290"></embed></object><p>Check out my <a href="http://pixelinvaders.ch/?page_id=171">PixelInvaders Shop if you want to buy some LED strands</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/06/lpd6803-tutorial-part-2-simple-vu-meter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LPD6803 (Intelligent RGB Pixel Module) Tutorial, Part 1: Basics</title>
		<link>http://neophob.com/2011/06/lpd6803-tutorial-part-1-basics/</link>
		<comments>http://neophob.com/2011/06/lpd6803-tutorial-part-1-basics/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 20:16:04 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Feature]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Led]]></category>
		<category><![CDATA[LPD6803]]></category>
		<category><![CDATA[RGB]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1118</guid>
		<description><![CDATA[An LPD6803 based LED module is an “intelligent” pixel, it can memorize its color and passthrough the data and power connection. This means you can drive a lot (several thousand) intelligent pixels with just 4 cables (2x power and 2x data). Take a look at ladyada’s very informative post about the LPD6803 module. So where [...]]]></description>
			<content:encoded><![CDATA[<p>An LPD6803 based LED module is an “intelligent” pixel, it can memorize its color and passthrough the data and power connection. This means you can drive a lot (several thousand) intelligent pixels with just 4 cables (2x power and 2x data).</p>
<p>Take a look at <a href="http://www.ladyada.net/products/rgbledpixel/">ladyada’s very informative post about the LPD6803</a> module.</p>
<p><center><img src="http://neophob.com/wp-content/uploads/2011/06/lpd6803-1.jpg" alt="" title="An LPD6803 Module - aka Intelligent Pixel" width="500" height="221" class="alignnone size-full wp-image-1128" /></center></p>
<p>So where to <a href="http://pixelinvaders.ch/?page_id=171">buy</a> these Intelligent, LPD6803 based Pixels? At my <a href="http://pixelinvaders.ch/?page_id=171">PixelInvaders Shop</a> for example!</p>
<p><strong>Needed Hardware:</strong></p>
<ul>
<li>An Arduino Compatible Board</li>
<li>A 12V Power supply (an <a href="http://www.wikihow.com/Convert-a-Computer-ATX-Power-Supply-to-a-Lab-Power-Supply">old ATX Power supply</a> is perfectly fine)</li>
<li>A strand of some LPD6803 based LED modules</li>
<li>Some cables to connect the LPD6803 module</li>
</ul>
<p>I had some cardboard angle laying around an thought, why not build a DIY Wall Washer.<br />
<center><img src="http://neophob.com/wp-content/uploads/2011/06/DIY-Wallwasher.png" alt="" title="DIY-Wallwasher" width="600" height="136" class="alignnone size-full wp-image-1133" /></center><br />
And here is the result:<br />
<center><img src="http://neophob.com/wp-content/uploads/2011/06/DIY-Wallwasher2.png" alt="" title="DIY-Wallwasher2" width="600" height="317" class="alignnone size-full wp-image-1135" /></center> <br />
The wiring is very easy, take a look at this wiring diagram done by ladyada:<br />
<center><img src="http://neophob.com/wp-content/uploads/2011/06/arduinowiring.jpg" alt="" title="arduinowiring" width="576" height="467" class="alignnone size-full wp-image-1139" /></center><br />
Connect pin 2 (yellow) to the <strong>green</strong> color of the LPD6803 Module.<br />
Connect pin 3 (green) to the <strong>blue</strong> color of the LPD6803 Module.<br />
Red is V+, Black is GND.</p>
<p><strong>Links:</strong><br />
<a href="http://pixelinvaders.ch/?page_id=171">- LPD6803 LED module shop</a><br />
<a href="https://github.com/neophob/LPD6803-RGB-Pixels">- All source files on GitHub</a></p>
<p>Two Videos showing the Wall Washer in action. <strong>Note</strong>: The Wall Washer looks brighter in reality.<br /><object width="520" height="290"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=25519989&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=25519989&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="520" height="290"></embed></object></p><object width="520" height="290"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=25520434&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=25520434&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="520" height="290"></embed></object><p> </p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/06/lpd6803-tutorial-part-1-basics/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Free shopping platforms</title>
		<link>http://neophob.com/2011/06/free-shopping-platforms/</link>
		<comments>http://neophob.com/2011/06/free-shopping-platforms/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 17:53:11 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[hosted]]></category>
		<category><![CDATA[shopping]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1105</guid>
		<description><![CDATA[I’m looking for a hosted, nice looking, easy to use and free shop system — but that’s easier said than done! I still didn’t found THE shop, here is my list http://www.shopify.com — not free, used as reference http://www.foxycart.com/ — only free during development http://www.vendder.com/ — nice looking, i18n http://www.39shops.com — nice looking, payment process [...]]]></description>
			<content:encoded><![CDATA[<p>I’m looking for a hosted, nice looking, easy to use and free shop system — but that’s easier said than done! I still didn’t found THE shop, here is my list</p>
<p><a href="http://www.shopify.com">http://www.shopify.com</a> — not free, used as reference</p>
<p><a href="http://www.foxycart.com/">http://www.foxycart.com/</a> — only free during development<br />
<a href="http://vendder.com/?aff=pixelinvaders">http://www.vendder.com/</a> — nice looking, i18n<br />
<a href="http://www.39shops.com">http://www.39shops.com</a> — nice looking, payment process it too painfull (region, taxes…)<br />
<a href="http://tinypay.me/">http://tinypay.me/</a> — nice looking<br />
<a href="http://wosbee.com/">http://wosbee.com/</a> — looks ugly — didn’t try<br />
<a href="http://yokaboo.com/">http://yokaboo.com/</a> — only one image per product — didn’t try<br />
<a href="http://bigcartel.com">http://bigcartel.com</a> — 5 products and one image per product — didn’t try<br />
<a href="http://www.pipfrog.com">http://www.pipfrog.com</a> — limit monthly visits to 3000 views — didn’t try</p>
<p><a href="http://simplecartjs.com/">http://simplecartjs.com/</a> — js solution</p>
<p>do <strong>YOU</strong> have some alternatives?</p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/06/free-shopping-platforms/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Serial library rxtx v2.2pre5</title>
		<link>http://neophob.com/2011/05/serial-library-rxtx-v2-2pre5/</link>
		<comments>http://neophob.com/2011/05/serial-library-rxtx-v2-2pre5/#comments</comments>
		<pubDate>Wed, 25 May 2011 19:03:22 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[latency]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Serial]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1088</guid>
		<description><![CDATA[This is another rxtx library release based on my previous release. This new version improves the “serial event callback function” and thus reduce the library latency enormous — for more information read THIS article. So whats the use of this updated library? For example, talk to your Arduino up to 10 times faster with the [...]]]></description>
			<content:encoded><![CDATA[<p>This is another rxtx library release based on my <a href="http://neophob.com/2010/07/serial-library-rxtx-v2-2pre3/">previous release</a>. This new version improves the “serial event callback function” and thus reduce the library latency enormous — for more information <a href="http://neophob.com/2011/04/serial-latency-teensy-vs-arduino/">read THIS article</a>.<br />
So whats the use of this updated library? For example, talk to your Arduino up to 10 times faster with the new library.</p>
<p>Download my modified source <a href="http://neophob.com/files/rxtx-2.2pre5-src.zip">rxtx-2.2pre5-src.zip</a><br />
and the Windows and MacOSX binaries <a href="http://neophob.com/files/rxtx-2.2pre5-bin.zip">rxtx-2.2pre5-bin.zip</a></p>
<p>Here is the <a href="http://neophob.com/files/rxtx-pre5.patch">cvs diff</a>.</p>
<p>Build RXTX library for Windows — make sure you installed Visual Studio Express.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools&gt;vsvars32.bat<br />
Setting environment for using Microsoft Visual Studio 2010 x86 tools.<br />
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools&gt;cd c:\rxtx-devel\<br />
<br />
C:\rxtx-devel&gt; mkdir build<br />
C:\rxtx-devel&gt; copy Makefile.msvc build\Makefile<br />
C:\rxtx-devel&gt; cd build<br />
C:\rxtx-devel\build&gt; set path=%PATH%;“C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin“<br />
<br />
# EDIT Makefile and correct path variables<br />
<br />
C:\rxtx-devel\build&gt; nmake serial</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/05/serial-library-rxtx-v2-2pre5/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Serial Latency: Teensy vs. Arduino</title>
		<link>http://neophob.com/2011/04/serial-latency-teensy-vs-arduino/</link>
		<comments>http://neophob.com/2011/04/serial-latency-teensy-vs-arduino/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 22:09:31 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[latency]]></category>
		<category><![CDATA[teensy]]></category>

		<guid isPermaLink="false">http://neophob.com/?p=1025</guid>
		<description><![CDATA[Paul Stoffregen was kind enough to send my a free Teensy 2.0 sample board to analyze the Arduino serial latency issue — and this board is shocking small: We wrote a very simple firmware to perform some basic benchmarks — Paul wrote a simple c tool to measure the native latency, I wrote a simple [...]]]></description>
			<content:encoded><![CDATA[<p>Paul Stoffregen was kind enough to send my a free <a href="http://www.pjrc.com/store/teensy.html">Teensy 2.0</a> sample board to analyze the Arduino <a href="http://neophob.com/2011/02/low-latency-serial-arduino/">serial latency issue</a> — and this board is shocking small:<br />
<center><img src="http://neophob.com/wp-content/uploads/2011/04/duinos.png" alt="" title="duinos" width="530" height="400" class="alignnone size-full wp-image-1034" /><br />
</center></p>
<p>We wrote a very simple firmware to perform some basic benchmarks — Paul wrote a simple c tool to measure the native latency, I wrote a simple tool in Java using rxtx lib to measure the latency in Java. </p>
<p>Long story short, here are the results:<br />
<center><br />
<img src="http://neophob.com/wp-content/uploads/2011/04/serial-latency1.png" alt="" title="serial-latency" width="530" height="300" class="alignnone size-full wp-image-1038" /><br />
</center></p>
<p><strong>Hint:</strong> These results are made on my MacBook (Model 5,1), Intel Core 2 Duo, 2GHz, uname output: “Darwin xxx 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386”</p>
<p>Conclusion:</p>
<ul>
<li>Java latency is at least 20ms</li>
<li>The Arduino UNO may be slower than the Arduino 2009 if small a amount of serial bytes (<12b) are transferred</li>
<li>The Teensy 2.0 board may be up to 18 times faster than an Arduino board</li>
</ul>
<p>So this 20ms latency using the rxtx library looks quite promising… hmm take a look at this code snipped from the file <strong>SerialImp.c</strong>:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">void report_serial_events( struct event_info_struct *eis )<br />
{<br />
    /* JK00: work around for Multi IO cards without TIOCSERGETLSR */<br />
<br />
&lt;…&gt;<br />
<br />
            usleep(20000);<br />
#if !defined(__sun__)<br />
    /* FIXME: No time to test on all OS’s for production */<br />
            usleep(20000);<br />
#endif /* !__sun__ */<br />
            return;<br />
        }<br />
        report(“report_serial_events: sending DATA_AVAILABLE\n”);<br />
        if(!send_event( eis, SPE_DATA_AVAILABLE, 1 ))<br />
        {<br />
            /* select wont block */<br />
    /* FIXME: No time to test on all OS’s for production */<br />
/* REMOVE goes around usleep */<br />
#if !defined(__sun__)<br />
#endif /* !__sun__ */<br />
        }<br />
        usleep(20000);<br />
    }<br />
}</div></td></tr></tbody></table></div>
<blockquote><p>Replace this 20’000ms delay with a shorter (I used 2000ms), recompile and enjoy decreased latency!</p></blockquote>
<p><strong>Files</strong> used for this article:<br />
<a href="http://neophob.com/files/latency-test.zip">- Performance test files</a><br />
<a href="http://neophob.com/files/rxtx-test-lowlatency.zip">- RXTX TEST library, only 64b Mac OSX!</a></p>
<p>The rxtx lib is not very well tested (not at all!) — so leave a feedback if the lib is working fine for you!</p>
<p>Anyway, here are the results on OSX with the patched rxtx library:<center><img src="http://neophob.com/wp-content/uploads/2011/04/serial-latency2.png" alt="" title="serial-latency2" width="530" height="300" class="alignnone size-full wp-image-1084" /></center></p>
<p><hl/><br />
<strong>Update 16.05.2011:</strong><br />
Paul did some <a href="http://arduino.cc/forum/index.php/topic,59892.0.html">more native performance tests</a>, here are the results:<center><img src="http://neophob.com/wp-content/uploads/2011/04/teensyLinux.png" alt="" title="teensyLinux" width="321" height="285" class="alignnone size-full wp-image-1090" /><br />
<img src="http://neophob.com/wp-content/uploads/2011/04/teensyWin.png" alt="" title="teensyWin" width="341" height="281" class="alignnone size-full wp-image-1091" /><br />
</center></p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/04/serial-latency-teensy-vs-arduino/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Low Latency Serial Arduino?</title>
		<link>http://neophob.com/2011/02/low-latency-serial-arduino/</link>
		<comments>http://neophob.com/2011/02/low-latency-serial-arduino/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 23:32:52 +0000</pubDate>
		<dc:creator>michu</dc:creator>
				<category><![CDATA[Feature]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[PureData]]></category>

		<guid isPermaLink="false">http://www.neophob.com/?p=1002</guid>
		<description><![CDATA[I use Processing to control my Arduino — an easy and working solution. However if you need to send alot data to the Arduino, you’ll notice a 20ms delay between sending (120 bytes) and receieving (16 bytes) a serial message. After playing around with the rxtx Library (changed some timeouts, JNI version…) I guess the [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://www.processing.org/">Processing</a> to control my <a href="http://www.arduino.cc/">Arduino</a> — an easy and working solution. However if you need to send alot data to the Arduino, you’ll notice a 20ms delay between sending (120 bytes) and receieving (16 bytes) a serial message. After playing around with the <a href="http://rxtx.qbang.org/">rxtx Library</a> (changed some timeouts, JNI version…) I guess the bottleneck is the Java JNI call.</p>
<p>While the serial interface is not a part of the JRE (anymore), the network stack is. This means we can send network packets at full speed. And there should be some Network to Serial tools available for my Mac OSX. <strong>Nope</strong>! I found plenty of such tools, but not a single one was working:</p>
<p>First I checked the Arduino Playground about <a href="http://www.arduino.cc/playground/Code/SerialIP">SerialIP</a>. A Serial IP library for the Arduino exist — but I couldn’t find a SLIP utility for Mac OSX 10.6.6. There was once <a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/10.5/man8/slattach.8.html">slattach</a> — but only for pre OSX 10.6. I compiled the source myself without success.</p>
<p>The next step was another Arduino Playground wiki entry, about <a href="http://www.arduino.cc/playground/Interfacing/SerialNet">SerialNet</a>. To make the long story short, here are the tools I tried without success:</p>
<ul>
<li>nc –l –p 4443 –D &lt; /dev/tty.usbmodem621 &gt; /dev/tty.usbmodem621</li>
<li>./<a href="http://sourceforge.net/projects/ser2net/">ser2net</a> –C “3001:raw:0:/dev/tty.usbmodem621:115200 NONE 1STOPBIT 8DATABITS –XONXOFF –LOCAL –RTSCTS”</li>
<li><a href="http://www.dest-unreach.org/socat/">socat</a> –d –d –d –x –s –t 30 TCP-LISTEN:4441 GOPEN:/dev/tty.usbmodem621,raw,ispeed=115200,ospeed=115200,ignoreeof</li>
<li><a href="http://code.google.com/p/tinkerit/wiki/TinkerProxy">Tinkerproxy</a> v2.0</li>
</ul>
<p>Socat v1.7.1.3 <strong>hints</strong>: the “nonblock” option for the serial device resulted in a “tcsetattr(3, TCSADRAIN, 0x7fff5fbfefd0): Invalid argument” error, I guess this operation is not supported by the OS. Gerhard gave me another hint, that I should use the GOPEN address type (I was using the PTY address type — this *should* create a new PTY and not open an existing one. This is a bug in the v1.7.1.3 version).</p>
<p>Disclaimer: Maybe I was just too stupid to use those tools correct…</p>
<p>The solution was a bit funky — I created a <a href="http://puredata.info/">PureData</a> patch. Whats PureData?</p>
<blockquote><p>PureData is a real-time graphical programming environment for audio, video, and graphical processing.</p></blockquote>
<p>But you can use it as network-to-serial relay too. Here is my patch as image:<br />
<center><img src="http://pixelinvaders.ch/neophob.com/wp-content/uploads/2011/02/pd-tcp2serial.png" alt="" title="pd-tcp2serial" width="385" height="359" class="aligncenter size-full wp-image-1021" /></center></p>
<p>You may <a href="http://www.neophob.com/files/pd-tcpserver.pd.zip">download the patch here</a>. Features of the v0.1 release:</p>
<ul>
<li>Autoconnect Serial Port</li>
<li>Autoconnect back to your listening Server</li>
<li>TCP and UDP supported (replace tcpreceive with udpreceive and tcpsend with udpsend)</li>
</ul>
<p>Here is the processing sketch I used to test my solution:</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">processing.net.*</span><span style="color: #339933;">;</span><br />
<br />
Client c<span style="color: #339933;">;</span><br />
Server myServer<span style="color: #339933;">;</span><br />
<br />
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
  frameRate<span style="color: #009900;">(</span><span style="color: #cc66cc;">200</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  myServer <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Server<span style="color: #009900;">(</span><span style="color: #000000; font-weight: bold;">this</span>, <span style="color: #cc66cc;">7777</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  c <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Client<span style="color: #009900;">(</span><span style="color: #000000; font-weight: bold;">this</span>, <span style="color: #0000ff;">“127.0.0.1″</span>, <span style="color: #cc66cc;">7778</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Connect to server on port 80</span><br />
<span style="color: #009900;">}</span><br />
<br />
<span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
  <span style="color: #000066; font-weight: bold;">long</span> l1 <span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">currentTimeMillis</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  <span style="color: #000066; font-weight: bold;">byte</span> buf<span style="color: #009900;">[</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">byte</span><span style="color: #009900;">[</span><span style="color: #cc66cc;">70</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span><br />
  buf<span style="color: #009900;">[</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">]</span><span style="color: #339933;">=</span>0x01<span style="color: #339933;">;</span><br />
  buf<span style="color: #009900;">[</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">]</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
  buf<span style="color: #009900;">[</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">]</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">64</span><span style="color: #339933;">;</span><br />
  buf<span style="color: #009900;">[</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">]</span><span style="color: #339933;">=</span>0x03<span style="color: #339933;">;</span><br />
  buf<span style="color: #009900;">[</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">]</span><span style="color: #339933;">=</span>0x10<span style="color: #339933;">;</span><br />
  <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">int</span> j<span style="color: #339933;">=</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span> j<span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">70</span><span style="color: #339933;">;</span> j<span style="color: #339933;">++</span><span style="color: #009900;">)</span> buf<span style="color: #009900;">[</span>j<span style="color: #009900;">]</span><span style="color: #339933;">=</span>0x20<span style="color: #339933;">;</span><br />
  c.<span style="color: #006633;">write</span><span style="color: #009900;">(</span>buf<span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  print<span style="color: #009900;">(</span><span style="color: #0000ff;">“SEND “</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  <br />
  Client thisClient<span style="color: #339933;">=</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
  <span style="color: #000066; font-weight: bold;">boolean</span> gotData<span style="color: #339933;">=</span><span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
  <span style="color: #000066; font-weight: bold;">int</span> i<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
  <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">(</span><span style="color: #339933;">!</span>gotData<span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    thisClient <span style="color: #339933;">=</span> myServer.<span style="color: #006633;">available</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">(</span>thisClient<span style="color: #339933;">!=</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
      <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">(</span>thisClient.<span style="color: #006633;">available</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
        gotData <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
      <span style="color: #009900;">}</span><br />
    <span style="color: #009900;">}</span> <br />
    <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">{</span><br />
      i<span style="color: #339933;">++;</span><br />
      delay<span style="color: #009900;">(</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
      <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">(</span>i<span style="color: #339933;">==</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
        println<span style="color: #009900;">(</span><span style="color: #0000ff;">“noreply!”</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
        <span style="color: #000000; font-weight: bold;">return</span><span style="color: #339933;">;</span><br />
      <span style="color: #009900;">}</span><br />
    <span style="color: #009900;">}</span><br />
  <span style="color: #009900;">}</span><br />
<br />
  println<span style="color: #009900;">(</span><span style="color: #0000ff;">“incomming serial data “</span><span style="color: #339933;">+</span>thisClient.<span style="color: #006633;">available</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">+</span><span style="color: #0000ff;">” bytes after “</span><span style="color: #339933;">+</span><span style="color: #009900;">(</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">currentTimeMillis</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">-</span>l1<span style="color: #009900;">)</span><span style="color: #339933;">+</span><span style="color: #0000ff;">“ms”</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">(</span>thisClient<span style="color: #339933;">!=</span><span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> thisClient.<span style="color: #006633;">available</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    <span style="color: #000066; font-weight: bold;">int</span> b <span style="color: #339933;">=</span> thisClient.<span style="color: #006633;">read</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
    <span style="color: #666666; font-style: italic;">//print(“0x”+Integer.toHexString(b)+”, ”);</span><br />
  <span style="color: #009900;">}</span><br />
  <span style="color: #666666; font-style: italic;">//  println();</span><br />
<span style="color: #009900;">}</span></div></td></tr></tbody></table></div>
<p>And this is the Arduino Sketch:</p>
<div class="codecolorer-container c twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br />115<br />116<br />117<br />118<br />119<br />120<br />121<br />122<br />123<br />124<br />125<br />126<br />127<br />128<br />129<br />130<br />131<br />132<br />133<br />134<br />135<br />136<br />137<br />138<br />139<br />140<br />141<br />142<br />143<br />144<br />145<br />146<br />147<br /></div></td><td><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">#include &lt;TimerOne.h&gt;</span><br />
<br />
<span style="color: #339933;">#define BAUD_RATE 115200</span><br />
<br />
<span style="color: #666666; font-style: italic;">//— protocol data start</span><br />
<span style="color: #339933;">#define CMD_START_BYTE  0x01</span><br />
<span style="color: #339933;">#define CMD_SENDFRAME 0x03</span><br />
<br />
<span style="color: #339933;">#define START_OF_DATA 0x10</span><br />
<span style="color: #339933;">#define END_OF_DATA 0x20</span><br />
<br />
<span style="color: #666666; font-style: italic;">//frame size for specific color resolution</span><br />
<span style="color: #339933;">#define COLOR_5BIT_FRAME_SIZE 64</span><br />
<span style="color: #339933;">#define SERIAL_HEADER_SIZE 5</span><br />
<span style="color: #666666; font-style: italic;">//— protocol data end</span><br />
<br />
<span style="color: #339933;">#define SERIAL_DELAY_LOOP 3</span><br />
<span style="color: #339933;">#define SERIAL_WAIT_DELAY 3</span><br />
<br />
<span style="color: #666666; font-style: italic;">//this should match RX_BUFFER_SIZE from HardwareSerial.cpp</span><br />
byte serInStr<span style="color: #009900;">[</span>COLOR_5BIT_FRAME_SIZE<span style="color: #339933;">+</span>SERIAL_HEADER_SIZE<span style="color: #009900;">]</span><span style="color: #339933;">;</span>                     <span style="color: #666666; font-style: italic;">// array that will hold the serial input string</span><br />
<br />
<span style="color: #339933;">#define SERIALBUFFERSIZE 16</span><br />
byte serialResonse<span style="color: #009900;">[</span>SERIALBUFFERSIZE<span style="color: #009900;">]</span><span style="color: #339933;">;</span><br />
<br />
byte g_errorCounter<span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//send status back to library</span><br />
<span style="color: #993333;">static</span> <span style="color: #993333;">void</span> sendAck<span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
  serialResonse<span style="color: #009900;">[</span><span style="color: #0000dd;">0</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">‘A’</span><span style="color: #339933;">;</span><br />
  serialResonse<span style="color: #009900;">[</span><span style="color: #0000dd;">1</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">‘K’</span><span style="color: #339933;">;</span><br />
  serialResonse<span style="color: #009900;">[</span><span style="color: #0000dd;">2</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> Serial.<span style="color: #202020;">available</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  serialResonse<span style="color: #009900;">[</span><span style="color: #0000dd;">3</span><span style="color: #009900;">]</span> <span style="color: #339933;">=</span> g_errorCounter<span style="color: #339933;">;</span><br />
  Serial.<span style="color: #202020;">write</span><span style="color: #009900;">(</span>serialResonse<span style="color: #339933;">,</span> SERIALBUFFERSIZE<span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">}</span><br />
<br />
<span style="color: #993333;">void</span> setup<span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
  pinMode<span style="color: #009900;">(</span><span style="color: #0000dd;">13</span><span style="color: #339933;">,</span> OUTPUT<span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  <br />
  <a href="http://www.opengroup.org/onlinepubs/009695399/functions/memset.html"><span style="color: #000066;">memset</span></a><span style="color: #009900;">(</span>serialResonse<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> SERIALBUFFERSIZE<span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
<br />
  Serial.<span style="color: #202020;">begin</span><span style="color: #009900;">(</span>BAUD_RATE<span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Setup high speed Serial</span><br />
  Serial.<span style="color: #202020;">flush</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">}</span><br />
<br />
<span style="color: #993333;">void</span> loop<span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
  <span style="color: #666666; font-style: italic;">//read the serial port and create a string out of what you read</span><br />
  g_errorCounter<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<br />
  <span style="color: #666666; font-style: italic;">// digitalWrite(13, LOW);</span><br />
  <span style="color: #666666; font-style: italic;">// see if we got a proper command string yet</span><br />
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span>readCommand<span style="color: #009900;">(</span>serInStr<span style="color: #009900;">)</span> <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span><br />
  <span style="color: #009900;">}</span><br />
<br />
  digitalWrite<span style="color: #009900;">(</span><span style="color: #0000dd;">13</span><span style="color: #339933;">,</span> HIGH<span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  <br />
    <span style="color: #666666; font-style: italic;">//i2c addres of device</span><br />
  byte addr    <span style="color: #339933;">=</span> serInStr<span style="color: #009900;">[</span><span style="color: #0000dd;">1</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span><br />
  <span style="color: #666666; font-style: italic;">//how many bytes we’re sending</span><br />
  byte sendlen <span style="color: #339933;">=</span> serInStr<span style="color: #009900;">[</span><span style="color: #0000dd;">2</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span><br />
  <span style="color: #666666; font-style: italic;">//what kind of command we send</span><br />
  byte type <span style="color: #339933;">=</span> serInStr<span style="color: #009900;">[</span><span style="color: #0000dd;">3</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span><br />
  <span style="color: #666666; font-style: italic;">//parameter</span><br />
  byte<span style="color: #339933;">*</span> cmd    <span style="color: #339933;">=</span> serInStr<span style="color: #339933;">+</span><span style="color: #0000dd;">5</span><span style="color: #339933;">;</span><br />
  <br />
   <span style="color: #b1b100;">switch</span> <span style="color: #009900;">(</span>type<span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
   <span style="color: #b1b100;">case</span> CMD_SENDFRAME<span style="color: #339933;">:</span><br />
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span>sendlen <span style="color: #339933;">==</span> COLOR_5BIT_FRAME_SIZE<span style="color: #009900;">)</span> <span style="color: #009900;">{</span>    <br />
        <span style="color: #009900;">}</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">{</span><br />
      g_errorCounter<span style="color: #339933;">=</span><span style="color: #0000dd;">100</span><span style="color: #339933;">;</span><br />
        <span style="color: #009900;">}</span><br />
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
<br />
    <span style="color: #b1b100;">case</span> CMD_PING<span style="color: #339933;">:</span><br />
        <span style="color: #666666; font-style: italic;">//just send the ack!</span><br />
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
    <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span><br />
        <span style="color: #666666; font-style: italic;">//invalid command</span><br />
        g_errorCounter<span style="color: #339933;">=</span><span style="color: #0000dd;">130</span><span style="color: #339933;">;</span> <br />
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
  <span style="color: #009900;">}</span><br />
  sendAck<span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
  digitalWrite<span style="color: #009900;">(</span><span style="color: #0000dd;">13</span><span style="color: #339933;">,</span> LOW<span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">}</span><br />
<br />
byte readCommand<span style="color: #009900;">(</span>byte <span style="color: #339933;">*</span>str<span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
  byte b<span style="color: #339933;">,</span>i<span style="color: #339933;">,</span>sendlen<span style="color: #339933;">;</span><br />
<br />
  <span style="color: #666666; font-style: italic;">//wait until we get a CMD_START_BYTE or queue is empty</span><br />
  i<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
  <span style="color: #b1b100;">while</span> <span style="color: #009900;">(</span>Serial.<span style="color: #202020;">available</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">&gt;</span><span style="color: #0000dd;">0</span> <span style="color: #339933;">&amp;&amp;</span> i<span style="color: #339933;">==</span><span style="color: #0000dd;">0</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    b <span style="color: #339933;">=</span> Serial.<span style="color: #202020;">read</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span><br />
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span>b <span style="color: #339933;">==</span> CMD_START_BYTE<span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
      i<span style="color: #339933;">=</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span><br />
    <span style="color: #009900;">}</span><br />
  <span style="color: #009900;">}</span><br />
<br />
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span>i<span style="color: #339933;">==</span><span style="color: #0000dd;">0</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    <span style="color: #666666; font-style: italic;">//failed to get data ignore it</span><br />
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>    <br />
  <span style="color: #009900;">}</span><br />
<br />
  <span style="color: #666666; font-style: italic;">//read header  </span><br />
  i <span style="color: #339933;">=</span> SERIAL_DELAY_LOOP<span style="color: #339933;">;</span><br />
  <span style="color: #b1b100;">while</span> <span style="color: #009900;">(</span>Serial.<span style="color: #202020;">available</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #339933;">&lt;</span> SERIAL_HEADER_SIZE<span style="color: #339933;">-</span><span style="color: #0000dd;">1</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>   <span style="color: #666666; font-style: italic;">// wait for the rest</span><br />
    delay<span style="color: #009900;">(</span>SERIAL_WAIT_DELAY<span style="color: #009900;">)</span><span style="color: #339933;">;</span> <br />
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span>i<span style="color: #339933;">–</span> <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
      <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>        <span style="color: #666666; font-style: italic;">//no data available!</span><br />
    <span style="color: #009900;">}</span><br />
  <span style="color: #009900;">}</span><br />
  <span style="color: #b1b100;">for</span> <span style="color: #009900;">(</span>i<span style="color: #339933;">=</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>SERIAL_HEADER_SIZE<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    str<span style="color: #009900;">[</span>i<span style="color: #009900;">]</span> <span style="color: #339933;">=</span> Serial.<span style="color: #202020;">read</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>       <span style="color: #666666; font-style: italic;">// fill it up</span><br />
  <span style="color: #009900;">}</span><br />
<br />
  <span style="color: #666666; font-style: italic;">// — START HEADER CHECK    </span><br />
  <span style="color: #666666; font-style: italic;">//check if data is correct, 0x10 = START_OF_DATA</span><br />
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span>str<span style="color: #009900;">[</span><span style="color: #0000dd;">4</span><span style="color: #009900;">]</span> <span style="color: #339933;">!=</span> START_OF_DATA<span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
  <span style="color: #009900;">}</span><br />
<br />
  <span style="color: #666666; font-style: italic;">//check sendlen, its possible that sendlen is 0!</span><br />
  sendlen <span style="color: #339933;">=</span> str<span style="color: #009900;">[</span><span style="color: #0000dd;">2</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>  <br />
  <span style="color: #666666; font-style: italic;">// — END HEADER CHECK</span><br />
<br />
  <span style="color: #666666; font-style: italic;">//read data  </span><br />
  i <span style="color: #339933;">=</span> SERIAL_DELAY_LOOP<span style="color: #339933;">;</span><br />
  <span style="color: #666666; font-style: italic;">// wait for the final part, +1 for END_OF_DATA</span><br />
  <span style="color: #b1b100;">while</span> <span style="color: #009900;">(</span>Serial.<span style="color: #202020;">available</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #339933;">&lt;</span> sendlen<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    delay<span style="color: #009900;">(</span>SERIAL_WAIT_DELAY<span style="color: #009900;">)</span><span style="color: #339933;">;</span> <br />
    <span style="color: #b1b100;">if</span><span style="color: #009900;">(</span> i<span style="color: #339933;">–</span> <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span> <span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
      <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
    <span style="color: #009900;">}</span><br />
  <span style="color: #009900;">}</span><br />
<br />
  <span style="color: #b1b100;">for</span> <span style="color: #009900;">(</span>i<span style="color: #339933;">=</span>SERIAL_HEADER_SIZE<span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>SERIAL_HEADER_SIZE<span style="color: #339933;">+</span>sendlen<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    str<span style="color: #009900;">[</span>i<span style="color: #009900;">]</span> <span style="color: #339933;">=</span> Serial.<span style="color: #202020;">read</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>       <span style="color: #666666; font-style: italic;">// fill it up</span><br />
  <span style="color: #009900;">}</span><br />
<br />
  <span style="color: #666666; font-style: italic;">//check if data is correct, 0x20 = END_OF_DATA</span><br />
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span>str<span style="color: #009900;">[</span>SERIAL_HEADER_SIZE<span style="color: #339933;">+</span>sendlen<span style="color: #009900;">]</span> <span style="color: #339933;">!=</span> END_OF_DATA<span style="color: #009900;">)</span> <span style="color: #009900;">{</span><br />
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
  <span style="color: #009900;">}</span><br />
<br />
  <span style="color: #666666; font-style: italic;">//return data size (without meta data)</span><br />
  <span style="color: #b1b100;">return</span> sendlen<span style="color: #339933;">;</span><br />
<span style="color: #009900;">}</span></div></td></tr></tbody></table></div>
<p>Here are some performance results on Mac OSX v10.6.6, PureData v0.41.4-extended, Arduino v0022, Processing v1.2.1 — using an Arduino UNO:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:666px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SEND incomming serial data <span style="color: #000000;">16</span> bytes after 31ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 30ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 18ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 31ms<br />
SEND incomming serial data <span style="color: #000000;">14</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">3</span> bytes after 20ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 20ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 32ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 30ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 18ms<br />
SEND incomming serial data <span style="color: #000000;">3</span> bytes after 29ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 31ms<br />
SEND incomming serial data <span style="color: #000000;">3</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">13</span> bytes after 8ms<br />
SEND incomming serial data <span style="color: #000000;">32</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 30ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">15</span> bytes after 20ms<br />
SEND incomming serial data <span style="color: #000000;">6</span> bytes after 25ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 30ms<br />
SEND incomming serial data <span style="color: #000000;">14</span> bytes after 22ms<br />
SEND incomming serial data <span style="color: #000000;">3</span> bytes after 31ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">9</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">7</span> bytes after 11ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 8ms<br />
SEND incomming serial data <span style="color: #000000;">9</span> bytes after 12ms<br />
SEND incomming serial data <span style="color: #000000;">23</span> bytes after 11ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 11ms<br />
SEND incomming serial data <span style="color: #000000;">3</span> bytes after 17ms<br />
SEND incomming serial data <span style="color: #000000;">3</span> bytes after 10ms<br />
SEND incomming serial data <span style="color: #000000;">25</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">7</span> bytes after 9ms<br />
SEND incomming serial data <span style="color: #000000;">32</span> bytes after 20ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 32ms<br />
SEND incomming serial data <span style="color: #000000;">9</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">7</span> bytes after 11ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 9ms<br />
SEND incomming serial data <span style="color: #000000;">32</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 21ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 31ms<br />
SEND incomming serial data <span style="color: #000000;">11</span> bytes after 19ms<br />
SEND incomming serial data <span style="color: #000000;">5</span> bytes after 11ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 11ms<br />
SEND incomming serial data <span style="color: #000000;">22</span> bytes after 20ms<br />
SEND incomming serial data <span style="color: #000000;">10</span> bytes after 18ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 3ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 17ms<br />
SEND incomming serial data <span style="color: #000000;">4</span> bytes after 8ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 11ms<br />
SEND incomming serial data <span style="color: #000000;">16</span> bytes after 11ms<br />
SEND incomming serial data <span style="color: #000000;">5</span> bytes after 8ms</div></td></tr></tbody></table></div>
<p><strong>Conclusion:</strong> Compared to using the rxtx JNI libraries I cannot see a huge performance boost! Sad but true. So my assumption was wrong — JNI is NOT the serial bottleneck using Arduino with the rxtx libraries. Again:</p>
<blockquote><p>JNI is NOT the serial bottleneck using Arduino with the rxtx libraries</p></blockquote>
<p><strong>Side note</strong>: I read on several forum threads (mainly on the Arduino forum) that the baudrate should not matter is you use the USB version. This conclusion <strong>is just wrong!</strong> You can use my code above and run the tests with 9600 bps and 115200 bps — you’ll notice a HUGE difference!</p>
]]></content:encoded>
			<wfw:commentRss>http://neophob.com/2011/02/low-latency-serial-arduino/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

