<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Hack a Day &#187; graphics</title>
	<atom:link href="http://hackaday.com/tag/graphics/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackaday.com</link>
	<description>Fresh hacks every day</description>
	<lastBuildDate>Sun, 12 Feb 2012 06:24:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hackaday.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/5560f98f805877b0e332f191cb9e0af3?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Hack a Day &#187; graphics</title>
		<link>http://hackaday.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hackaday.com/osd.xml" title="Hack a Day" />
	<atom:link rel='hub' href='http://hackaday.com/?pushpress=hub'/>
		<item>
		<title>Want to play Pong on your Oscilloscope?</title>
		<link>http://hackaday.com/2011/08/01/want-to-play-pong-on-your-oscilloscope/</link>
		<comments>http://hackaday.com/2011/08/01/want-to-play-pong-on-your-oscilloscope/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 23:00:49 +0000</pubDate>
		<dc:creator>Kevin Dady</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[tool hacks]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[oscilloscope]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=50821</guid>
		<description><![CDATA[I always have! I don&#8217;t know why, but I like the idea of using an oscilloscope screen as a general use video display. Why not? In my case it sits on my desk full time, has a large screen area, can do multiple modes of display, and is very easy control. Making an oscilloscope screen [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=50821&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-50822" title="Exif JPEG" src="http://hackadaycom.files.wordpress.com/2011/07/pdr_0011.jpg" alt="" width="470" height="373" /><br />
I always have! I don&#8217;t know why, but I like the idea of using an oscilloscope screen as a general use video display. Why not? In my case it sits on my desk full time, has a large screen area, can do multiple modes of display, and is very easy control.<br />
Making an oscilloscope screen do your bidding is an old trick. There are numerous examples out there. Its not a finished project yet, so be nice. It is actually rather crude, using a couple parts I had on hand just on a whim. The code is a nice mixture of ArduincoreGCCish (I am sorry, still learning), and includes the following demos:</p>
<ol>
<li>Simple low resolution dot drawing</li>
<li>A font example</li>
<li>A very quickly and badly written demo of pong</li>
</ol>
<p>The software runs on an Attiny84 micro controller clocked at 16Mhz, paired up with a Microchip MCP42100 dual 100k 8 bit digital potentiometer though the Attiny&#8217;s USI (Universal Serial Interface) pins. This is a fast, stable and accurate arrangement, but it requires sending 16 bits every time you want to change the value of one of the potentiometers so its also very piggy. I was just out to have some fun and did not have a proper 8 bit DAC. This was the closest thing outside of building one.<br />
Join us after the break for pictures a (very) brief video and more.</p>
<p><span id="more-50821"></span><br />
This project has a total resolution of 256x256x1. This sounds like a lot of resolution but don&#8217;t get too excited. You can have only a few hundred to maybe 1000 pixels on screen before it starts flickering pretty badly. I am sure this can be solved by someone who is not using GCC commands for almost all of an Arduino script, furiously tying to shove 16 or 32 bits of data out of its SPI port PER PIXEL with an Attiny that has no dedicated SPI.</p>
<p style="margin-bottom:0;"><img class="alignnone size-full wp-image-50931" title="Exif JPEG" src="http://hackadaycom.files.wordpress.com/2011/07/pdr_0009.jpg" alt="" width="470" height="353" /></p>
<p style="margin-bottom:0;">I had originally thought that I was going to do some form of raster scan display, much like a TV or computer monitor scanning a row of pixels one column at a time. You can see examples of this on <a href="http://www.electronixandmore.com/index.html">electronixandmore</a> in the projects section where the author converts RS170 television, and also VGA to an oscilloscope (along with a bunch of other cool stuff). Also take a look at this project that ran recently on Hackaday: <a href="http://hackaday.com/2011/02/14/nintendoscope/">NintendOscope</a>.On my little 84 it ended up being extremely slow to scan each and every pixel and then modulating the Z axis on the back of the scope to change the pixels brightness.</p>
<p>Ok fine let&#8217;s keep it simple, how about some vector lines? I copied the site&#8217;s logo and quickly traced it out using the gimp using its [Web &gt; Image Map] function. This spits out a file like this:</p>
<p><pre class="brush: cpp;">&lt;img src=&quot;Untitled.bmp&quot; width=&quot;125&quot; height=&quot;120&quot; border=&quot;0&quot; usemap=&quot;#map&quot; /&gt;
&lt;map name=&quot;map&quot;&gt;
&lt;!-- #$-:Image map file created by GIMP Image Map plug-in --&gt;
&lt;!-- #$-:GIMP Image Map plug-in by Maurits Rijk --&gt;
&lt;!-- #$-:Please do not edit lines starting with &quot;#$&quot; --&gt;
&lt;!-- #$VERSION:2.3 --&gt;
&lt;!-- #$AUTHOR:kevin --&gt;
&lt;area shape=&quot;poly&quot; coords=&quot;17,16,36,37,49,66,37,98,20,103,19,48&quot; nohref=&quot;nohref&quot; /&gt;
&lt;/map&gt;</pre></p>
<p style="margin-bottom:0;">By drawing only points in that file I was able to produce the first “image” below. With a little refinement I produced a slightly cleaner result in the second image. As you can see you have to be very mindful where your little pointer is going because it leaves a trail. I was not really happy with the quality of these first try results, though its generally a very fast way to draw out wire-frame polygons (think Asteroids).</p>
<p style="margin-bottom:0;"><img class="alignnone size-full wp-image-50829" title="Exif JPEG" src="http://hackadaycom.files.wordpress.com/2011/07/pdr_0038.jpg" alt="" width="470" height="353" /></p>
<p style="margin-bottom:0;"><img class="alignnone size-full wp-image-50830" title="Exif JPEG" src="http://hackadaycom.files.wordpress.com/2011/07/pdr_0001.jpg" alt="" width="470" height="391" /></p>
<p style="margin-bottom:0;">I ended up doing a mix. Instead of scanning every row and column, I only scan the rows and columns that have pixels to show. This produces a dot matrix image. I also needed an easy, but not epic, effort to convert images from computer to AVR. This was accomplished using the gimp, the XPM image format, and a little blob of lua.</p>
<p>Using the Hack a Day logo as an example, I roughly cropped out the skull and then used [Image &gt;&gt; Autocrop Image]. Next I went to [Image &gt;&gt; Canvas Size] and changed this to a 128&#215;128 canvas. Finally I used [Image &gt;&gt; Flatten Image] with black set as the color background. The next step is to remove the black background. That&#8217;s easy enough with [Colors &gt;&gt; Color to Alpha].</p>
<p>I could display this as a solid raster but it would be way too slow to make out an image with this hardware and software. I need to remove most of the pixels. In order to do this, I use a quickie gimp cheat, go to [Filters &gt;&gt; Alpha to Logo &gt;&gt; Neon]. Now change the effect size to 5 and the glow color to white. Finally, delete the neon glow layer and flatten.</p>
<p><img class="alignnone size-full wp-image-50832" title="Screenshot-1" src="http://hackadaycom.files.wordpress.com/2011/07/screenshot-1.png" alt="" width="470" height="353" /></p>
<p><img class="alignnone size-full wp-image-50833" title="Screenshot" src="http://hackadaycom.files.wordpress.com/2011/07/screenshot.png" alt="" width="470" height="353" /></p>
<p style="margin-bottom:0;">Since I am using a 1 bit per pixel color choice, I use [Image &gt;&gt; Mode &gt;&gt; Indexed], and choose 1 bit with no dithering. This produces a high quality outline of the logo, but it is still heavy on the pixels. In order to trim both ROM space and draw time I removed every other row and column by using [Filters &gt;&gt; Distorts &gt;&gt; Erase every other row]. I want it to fill with background which should be black. I did this once with rows and once with columns, even or odd is your choice, whichever looks better..</p>
<p style="margin-bottom:0;"><img class="alignnone size-full wp-image-50834" title="Screenshot-4" src="http://hackadaycom.files.wordpress.com/2011/07/screenshot-4.png" alt="" width="470" height="353" /></p>
<p style="margin-bottom:0;"><img class="alignnone size-full wp-image-50873" title="Screenshot-6" src="http://hackadaycom.files.wordpress.com/2011/07/screenshot-6.png" alt="" width="470" height="353" /></p>
<p style="margin-bottom:0;">I dug in at 800% and touched up all the graphics with a 1 pixel paintbrush and saved as XPM format. XPM format is a basic text format where different characters represent a different pixel and color value. With only 1 bit per pixel you can quite clearly see the image in the text.</p>
<p style="margin-bottom:0;"><img class="alignnone size-full wp-image-50874" title="Screenshot-7" src="http://hackadaycom.files.wordpress.com/2011/07/screenshot-7.png" alt="" width="470" height="353" /></p>
<p style="margin-bottom:0;">I removed the entire header, and so a lua script could phrase it I added “strings ={“ minus quotes so the file looks like:</p>
<p><pre class="brush: cpp;">
strings = {
“data”,
“data”,
};</pre></p>
<p style="margin-bottom:0;">after the bracket and semi colon I added the following little blob of lua:</p>
<p><pre class="brush: cpp;">
file = io.open(&quot;logo.out&quot;,&quot;w&quot;)
counter = 1;
for y = 1, #strings do
    for x = 1,#strings[y] do
        if string.sub(strings[y], x, x) == &quot;+&quot; then
            file:write(y .. &quot;,&quot;.. x .. &quot;,&quot;)
            counter = counter + 1
        end
    end
end
print(counter*2)
file:close()</pre></p>
<p style="margin-bottom:0;">This scans through the data and makes a file that contains a single line of comma separated values of every white pixel of the graphic. It also spits out a number in the command line which is the number of pixels * 2 for number of XY values. You need to know the number of pixels if you want to draw any graphic since the program loops though the lua generated CSV file. It&#8217;s basic and big but it works well enough for the example.</p>
<p>If you have lua installed its generally “lua filename.ext”, sometimes “lua51 filename.ext”, minus the quotes.</p>
<p>AvrGCCiberishduino code is an Arduino sketch with void setup, void loop, and I used analog read because there was no advantage to implementing it myself. Arduino&#8217;s expandability to other models of AVR and simplified functionality does very good for many things. When you need to bring out the speed it has its issues.</p>
<p>Pretty soon you are twiddling port registers and looking into how to use the USI (universal serial interface) to send out SPI because it is faster than you can do it in software blah blah blah. Eventually I had an Arduino sketch tied to only the attiny84, though one would need to only change pins for other attiny&#8217;s like the 85 or 2313.<br />
<a href="http://arduino.cc/en/Reference/SPI">Atmegas, like what is on a normal Arduino would need different SPI code to function</a>.)</p>
<p><pre class="brush: cpp;">
// System
#include &lt;avr/pgmspace.h&gt;
#define cmdOne 0x11 // write to pot 0(X)
#define cmdTwo 0x12 // write to pot 1(Y)

// Graphics
prog_uchar hadlogo[] PROGMEM ={5,19,5,21,5,23,5,25,5,103,5,105,5,107,5,109,6,27,6,101,7,19,7,29,7,99,7,107,7,109,8,21,9,23,9,31,9,97,9,105,11,25,11,33,11,95,11,103,13,26,13,34,13,94,13,103,15,25,15,35,15,93,15,103,17,23,17,35,17,93,17,105,19,7,19,9,19,21,19,35,19,92,19,107,19,119,19,121,21,7,21,11,21,19,21,36,21,91,21,109,21,117,21,121,23,8,23,13,23,15,23,17,23,37,23,89,23,111,23,113,23,115,23,121,25,9,25,39,25,87,25,119,27,10,27,41,27,85,27,118,29,11,29,43,29,83,29,117,30,13,30,45,30,115,31,15,31,47,31,81,31,113,32,17,32,111,33,19,33,21,33,23,33,25,33,49,33,57,33,59,33,61,33,63,33,65,33,67,33,69,33,71,33,79,33,105,33,107,33,109,34,103,35,27,35,51,35,53,35,55,35,73,35,75,35,77,35,101,36,99,37,29,37,31,37,49,37,77,37,97,39,33,39,47,39,79,39,95,41,35,41,45,41,81,41,93,43,37,43,43,43,83,43,91,45,39,45,41,45,85,45,89,47,40,47,87,49,39,49,87,51,38,51,88,53,37,53,89,55,37,55,47,55,49,55,51,55,53,55,55,55,71,55,73,55,75,55,77,55,89,56,79,57,37,57,45,57,57,57,69,57,81,57,89,59,37,59,45,59,57,59,69,59,83,59,89,61,37,61,44,61,57,61,69,61,83,61,89,63,37,63,57,63,69,63,83,63,89,64,43,65,37,65,53,65,55,65,70,65,73,65,83,65,89,66,45,66,51,66,75,67,37,67,47,67,49,67,77,67,83,67,89,68,79,69,37,69,81,69,89,71,36,71,38,71,63,71,65,71,89,71,91,73,35,73,39,73,87,73,93,74,64,75,33,75,40,75,86,75,95,77,31,77,41,77,63,77,65,77,85,77,97,78,29,78,99,79,27,79,42,79,83,79,101,80,25,80,104,81,17,81,19,81,21,81,23,81,44,81,82,81,107,81,109,81,111,82,15,83,13,83,46,83,81,83,83,83,113,83,115,85,11,85,43,85,47,85,80,85,85,85,117,87,9,87,41,87,48,87,58,87,70,87,80,87,87,87,119,89,8,89,39,89,49,89,57,89,59,89,69,89,71,89,79,89,89,89,121,90,15,91,7,91,13,91,17,91,37,91,51,91,53,91,55,91,61,91,63,91,65,91,67,91,73,91,75,91,77,91,91,91,111,91,113,91,115,91,121,93,7,93,11,93,19,93,35,93,91,93,109,93,117,93,121,95,7,95,9,95,21,95,35,95,92,95,107,95,119,95,121,97,23,97,35,97,93,97,105,99,25,99,35,99,93,99,103,101,25,101,34,101,94,101,103,103,25,103,33,103,95,103,103,104,23,105,21,105,31,105,97,105,105,105,107,107,19,107,29,107,99,107,109,108,27,108,101,109,19,109,21,109,23,109,25,109,103,109,105,109,107,109,109};

// Functions
void qshift(byte input) // using the USI for SPI
{
USIDR = input; // put a byte into the register
USISR = _BV(USIOIF); // clear flag
while ( (USISR &amp; _BV(USIOIF)) == 0 ) // send away
{
USICR = (1&lt;&lt;USIWM0)|(1&lt;&lt;USICS1)|(1&lt;&lt;USICLK)|(1&lt;&lt;USITC);
}
}
void latch(bool state) // toggle CS pin on digipot
{
if(state == 1) PORTA |= (1 &lt;&lt; 3); // raise the latch
else PORTA &amp;=~ (1 &lt;&lt; 3); // lower the latch
}&lt;/p&gt;
void logoscrn() // draw the Hack A Day logo
{
for (int i = 0; i &lt; 674; i += 2)
{
// 0,0 on an image is upper left, on scope its lower left
// subtract pixel Y value from 255 to flip right side up
latch(0); // lower the latch
qshift(cmdTwo); // send the write channel two command
qshift(255 - (64 + pgm_read_byte_near(hadlogo + i))); // send Y data
latch(1); // raise the latch
// image is offset by 64 as it is only has a 128x128 canvas
latch(0); // lower the latch
qshift(cmdOne); // send the write channel one command
qshift(64 + pgm_read_byte_near(hadlogo + (i + 1))); // send X data
latch(1); // raise the latch
}
}
// Arduino Setup
void setup()
{
// set pins of PORTA, PA7 &amp; PA2 as inputs, the rest are outputs&lt;/p&gt;
DDRA = 0x7B;
}
// Arduino Loop
void loop()
{
logoscrn();
}</pre></p>
<p><img class="alignnone size-full wp-image-50888" title="Exif JPEG" src="http://hackadaycom.files.wordpress.com/2011/07/pdr_0004.jpg" alt="" width="470" height="353" /></p>
<p style="margin-bottom:0;">As you can see, this is a much improved picture quality.</p>
<p>The other 2 demos use this basic system with a button wired up between pin 6 and ground to switch demos. Demo 2 uses a counter and a scale variable to zoom from the upper left corner to full size large font with 3 lines of text and room for a few more. Demo 3 is the start of a sloppy pong game with a (stupid and jumpy) cpu opponent, no scorekeeping and a looping ball. Just hook up a potentiometer with one end on ground the other on +5 and the middle to pin to pin 11 of the Attiny84.</p>
<p style="margin-bottom:0;"><img class="alignnone size-full wp-image-50890" title="Exif JPEG" src="http://hackadaycom.files.wordpress.com/2011/07/pdr_0012.jpg" alt="" width="470" height="376" /></p>
<p style="margin-bottom:0;"><img class="alignnone size-full wp-image-50891" title="Exif JPEG" src="http://hackadaycom.files.wordpress.com/2011/07/pdr_00181.jpg" alt="" width="470" height="361" /></p>
<p style="margin-bottom:0;"><img class="alignnone size-full wp-image-50892" title="SCN_0002" src="http://hackadaycom.files.wordpress.com/2011/07/scn_0002.jpg" alt="" width="470" height="402" /></p>
<p style="margin-bottom:0;"><a href="http://cheesefactory.us/filecenter/hadimg/code.zip">Software.zip</a> you will need a Programmer, Arduino or Arduino Core, and <a href="http://code.google.com/p/arduino-tiny/">Arduino Tiny</a></p>
<p style="margin-bottom:0;">Unfortunately for now I have to move on from this idea, but please fear that I shall return soon enough!</p>
<p style="margin-bottom:0;"><span style="text-align:center; display: block;"><a href="http://hackaday.com/2011/08/01/want-to-play-pong-on-your-oscilloscope/"><img src="http://img.youtube.com/vi/lqy76Bh4CDk/2.jpg" alt="" /></a></span></p>
<br />Filed under: <a href='http://hackaday.com/category/news/'>news</a>, <a href='http://hackaday.com/category/tool-hacks/'>tool hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/50821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/50821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/50821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/50821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/50821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/50821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/50821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/50821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/50821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/50821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/50821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/50821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/50821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/50821/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=50821&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/08/01/want-to-play-pong-on-your-oscilloscope/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">osgeld</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/pdr_0011.jpg" medium="image">
			<media:title type="html">Exif JPEG</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/pdr_0009.jpg" medium="image">
			<media:title type="html">Exif JPEG</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/pdr_0038.jpg" medium="image">
			<media:title type="html">Exif JPEG</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/pdr_0001.jpg" medium="image">
			<media:title type="html">Exif JPEG</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/screenshot-1.png" medium="image">
			<media:title type="html">Screenshot-1</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/screenshot.png" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/screenshot-4.png" medium="image">
			<media:title type="html">Screenshot-4</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/screenshot-6.png" medium="image">
			<media:title type="html">Screenshot-6</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/screenshot-7.png" medium="image">
			<media:title type="html">Screenshot-7</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/pdr_0004.jpg" medium="image">
			<media:title type="html">Exif JPEG</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/pdr_0012.jpg" medium="image">
			<media:title type="html">Exif JPEG</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/pdr_00181.jpg" medium="image">
			<media:title type="html">Exif JPEG</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/scn_0002.jpg" medium="image">
			<media:title type="html">SCN_0002</media:title>
		</media:content>
	</item>
		<item>
		<title>Displaying graphics on an oscilloscope</title>
		<link>http://hackaday.com/2011/06/10/displaying-graphics-on-an-oscilloscope/</link>
		<comments>http://hackaday.com/2011/06/10/displaying-graphics-on-an-oscilloscope/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 11:06:49 +0000</pubDate>
		<dc:creator>Brian Benchoff</dc:creator>
				<category><![CDATA[classic hacks]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[oscilloscope]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=45468</guid>
		<description><![CDATA[[Andrew Rossignol] was curious one day and decided that he wanted to display graphics on an oscilloscope after playing around with the X and Y inputs. [Andrew] started out with a resistor ladder on the DAC of his AVR Butterfly. He was able to to draw a line on the oscilloscope&#8217;s screen but bandwidth limitations [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=45468&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-large wp-image-45469" title="Hack a Day" src="http://hackadaycom.files.wordpress.com/2011/06/hackaday.jpg?w=450&#038;h=337" alt="" width="450" height="337" /></p>
<p>[Andrew Rossignol] was curious one day and decided that he wanted to display <a href="http://gtabfans.com/~andrew/homepage/oscilloscope.html">graphics on an oscilloscope</a> after playing around with the X and Y inputs.</p>
<p>[Andrew] started out with a resistor ladder on the DAC of his AVR Butterfly. He was able to to draw a line on the oscilloscope&#8217;s screen but bandwidth limitations forced him to reconsider his approach. A friend wrote a Python script to generate C code so the ports of the Butterfly can be toggled. After getting the Butterfly to generate a voltage for every non-white pixel, [Andrew] was impressed with the results so the code was modified determine the brightness of each pixel. The setup managed 10 shades of gray and careful selection of what graphics to post on the build log assured the project a little bit of blog cred.</p>
<p>There are a few ways to display a picture on an oscilloscope, like <a href="http://hackaday.com/2011/03/30/oscilloscope-thinks-its-a-video-monitor/">plugging the Hsync and Vsync into the inputs</a> of a scope. Except for a few <a href="http://hackaday.com/2011/04/14/analog-scope-stands-in-to-for-laser-light-show/">music visualizations</a>, we haven&#8217;t seen a scope display generated from a microcontroller. Great work [Andrew], but we&#8217;d like to mention there&#8217;s a <a href="http://www.weblogsinc.com/common/images/4979866997687398.JPG.2993447557774269">grayscale Hack a Day logo</a> from way back when.</p>
<p>Check out a video of [Andrew]&#8216;s oscilloscope after the break.</p>
<p><span id="more-45468"></span></p>
<span style="text-align:center; display: block;"><a href="http://hackaday.com/2011/06/10/displaying-graphics-on-an-oscilloscope/"><img src="http://img.youtube.com/vi/uYMxPjOw0gA/2.jpg" alt="" /></a></span>
<br />Filed under: <a href='http://hackaday.com/category/classic-hacks/'>classic hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/45468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/45468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/45468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/45468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/45468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/45468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/45468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/45468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/45468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/45468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/45468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/45468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/45468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/45468/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=45468&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/06/10/displaying-graphics-on-an-oscilloscope/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianbenchoff</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/06/hackaday.jpg?w=450" medium="image">
			<media:title type="html">Hack a Day</media:title>
		</media:content>
	</item>
		<item>
		<title>Spy Video TRAKR: software and first hack</title>
		<link>http://hackaday.com/2010/09/02/spy-video-trakr-software-and-first-hack/</link>
		<comments>http://hackaday.com/2010/09/02/spy-video-trakr-software-and-first-hack/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 13:45:17 +0000</pubDate>
		<dc:creator>Phil Burgess</dc:creator>
				<category><![CDATA[classic hacks]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[robots hacks]]></category>
		<category><![CDATA[toy hacks]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[POV]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[shift register]]></category>
		<category><![CDATA[spi]]></category>
		<category><![CDATA[spy]]></category>
		<category><![CDATA[toy]]></category>
		<category><![CDATA[tracker]]></category>
		<category><![CDATA[trakr]]></category>
		<category><![CDATA[wild planet]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=27791</guid>
		<description><![CDATA[Our initial view of the Spy Video TRAKR “App BUILDR” site had us believing this would be an internet-based code editor and compiler, similar to the mbed microcontroller development tools. Delving deeper into the available resources, we’re not entirely sure that’s an accurate assessment — TRAKR may well permit or even require offline development after all. Regardless [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=27791&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-27792" title="trakr-hacked" src="http://hackadaycom.files.wordpress.com/2010/08/trakr-hacked.jpg" alt="" width="470" height="350" /></p>
<p><a href="http://hackaday.com/2010/08/27/spy-video-trakr-first-impressions/">Our initial view</a> of the Spy Video TRAKR “App BUILDR” site had us believing this would be an internet-based code editor and compiler, similar to the <a href="http://hackaday.com/2009/11/21/review-mbed-nxp-lpc1768-microcontroller/">mbed microcontroller</a> development tools. <a href="http://hackaday.com/2010/08/30/spy-video-trakr-the-teardown/">Delving deeper</a> into the available resources, we’re not entirely sure that’s an accurate assessment — TRAKR may well permit or even require offline development after all. Regardless of the final plan, in the interim we have sniffed out the early documentation, libraries and standalone C compiler and have beaten it into submission for your entertainment, in order to produce our first TRAKR hack!</p>
<p><span id="more-27791"></span></p>
<p>TRAKR software development at the moment, to phrase it just as politely as we can, has a Wild West flavor to it. The finished tools and reference materials aren’t expected until October. Early documentation is rough — entire sections still missing — so it’s frequently necessary to rummage through their example code to learn how things operate. And the compiler is <em>exceedingly</em> rough right now…it requires a minor patch just to get started, and works only within <a href="http://www.cygwin.com/">Cygwin</a>, a UNIX-like command shell for Windows systems. So tonight we’re gonna program like it’s 1999! To continue, we’ll have to assume you’re at least vaguely familiar with command-line development tools, as explaining the entire process from scratch is more than we can fit here.</p>
<p>It probably goes without saying, but for posterity: these are beta tools and the entire process will almost certainly change as the TRAKR HAKR site nears release, rendering these directions obsolete. Until then, for those wanting to get an early start, here’s how we began building our own TRAKR hacks…</p>
<h2>Getting the compiler</h2>
<p>The C compiler and documentation are presently located on the <a href="http://www.spygear.net/help/apps.php">Apps Help page of the TRAKR web site</a>. Just follow the directions there to download the App Primer (containing the compiler and demo source code), the TRAKR Codebook PDF (an introduction to TRAKR programming), and the Function Reference and code snippets for lighter-weight reference once you’re familiar with the concepts.</p>
<p>The Apps Help page states that the tools work with Linux, but this isn’t entirely true. The App Primer ZIP file contains only the Cygwin (Windows) toolchain, along with the TRAKR libraries and sample code. The C compiler is based on arm-elf-gcc 3.4.6 — Linux users might stand a chance with the pre-built 3.4.3 package from the <a href="http://www.gnuarm.com/">GNU ARM</a> web site. You’ll still need to download the App Primer for the libraries. With Mac OS X, things get ugly…we’ve yet to locate a viable package for Intel Macs. Building the 3.4.6 toolchain from source (or via MacPorts) has brought only frustration, and the TRAKR makefiles don’t play nice with later (but working) arm-elf-gcc editions. Joy. Eager to move ahead, and not wanting to invest a lot of time on beta tools that are certain to change, some of us are simply using the Windows package in <a href="http://www.virtualbox.org/">VirtualBox</a> for now.</p>
<h2>Getting the compiler <em>to actually work</em></h2>
<p>After unpacking the App Primer ZIP file, copy the TRAKR.1 folder inside to a suitable working location within your Cygwin directory. The _MACOSX folder can be deleted — this is just an artifact of the files having passed through a Mac at one point; there are no OS X build tools here.</p>
<p>Just unpacking the Primer and trying to compile the examples, you’ll encounter a slew of “undefined reference” error messages and a failed build. There’s a problem with the TRAKR library — some test data that’s not properly archived — but it’s a straightforward fix. Go into the Internals directory and edit the Makefile using vi (or another editor of choice if you have one installed). Line 22 looks like this:</p>
<div>
<div>
<pre>OBJECTS = $(S_OBJECTS) $(O_OBJECTS)</pre>
</div>
</div>
<p>It should be changed to this:</p>
<div>
<div>
<div>
<pre>OBJECTS = $(S_OBJECTS) $(O_OBJECTS) $(O_IMAGES)</pre>
</div>
</div>
</div>
<p>Save the changes and exit the editor, then (still in the Internals directory) type:</p>
<pre>make trakr.a</pre>
<p>Now you can go back to any of the examples and successfully compile by typing “make”. For example:</p>
<pre>cd ../EX06_Sound
make</pre>
<p>This will create a “.bin” file that can be loaded onto the TRAKR. Attach a USB cable between your computer and the TRAKR vehicle (the power switch can be on or off, it doesn’t matter). In a moment, the TRAKR’s internal storage will show up as a small removable drive. Then just copy the .bin file to the APPs folder on this drive, e.g.:</p>
<pre>cp EX\ Sound.bin E:APPs</pre>
<p>Disconnect the USB cable, power up the TRAKR and remote, press the remote’s Home button and use either stick to navigate to the “EX Sound” menu item, then press the “Go” button. The app should prompt you to record 10 seconds of audio from the TRAKR’s microphone, then plays this back. Cool stuff!</p>
<h2>Writing your own apps</h2>
<p>Each TRAKR app is required to have three functions: Start(), Run() and End(). Your Start() function contains one-time initialization code, such as opening the motors to software control; End() is the complimentary function for when your program finishes, restoring control to normal TRAKR operation. Run() contains the meat of your application…this function is expected to return either “true” or “false” to indicate whether it should run again iteratively, or is ready to exit.</p>
<p>The header file svt.h contains constants and prototypes for the functions described in the Codebook and reference documents. This includes high-level functions for producing graphics and sound, turning the <a href="http://hackaday.com/2009/08/17/adafruit-releases-new-tv-b-gone-kit/">infrared LED</a> on or off, reading the controls, driving the motors and accessing the SD card. This is all the <em>Official Documented Stuff</em> thatApp BUILDR will encourage us to use.</p>
<p>But there’s a second header, JAPI.h, revealing much of the underlying functionality on which the TRAKR library is built. And for the time being, this is the only way to access the really interesting stuff like digital I/O, video processing and USB host. This is most definitely <em>not</em> the Official Documented Stuff, and relying on it now means your code will probably require some changes to work with the Official Stuff later.</p>
<p>There’s something conspicuously absent from both libraries: higher-level digital I/O such as serial <a href="http://hackaday.com/2010/06/24/adding-a-serial-port-to-the-zipit/">UART</a> or precise <a href="http://hackaday.com/2010/08/31/controlling-an-ac-drill-using-one-pwm-connection/">PWM</a> control. We’re not even certain yet whether any the accessible breakout lines correspond to these hardware functions. Maybe it’s something forthcoming, or maybe this will require the chip datasheet, with code talking to the registers directly. Worst case, such I/O will just have to be done with slower <a href="http://hackaday.com/2009/09/22/introduction-to-ftdi-bitbang-mode/">bit-banged</a> methods. Which is exactly what we do with…</p>
<h2>Our first hack</h2>
<p>We really wanted to showcase both the software and hardware hackability of the TRAKR. There isn’t the space for an overly-technical writeup, but neither do we want to send you off with a trivial modification. Hopefully we’ve found a good balance here…mildly esoteric, but most readers with modest prior soldering and programming experience should be able to follow along and create something similar.</p>
<p>Our inspiration came from <a href="http://hackaday.com/2010/08/05/txtbomber/">an earlier Hack a Day article about the txtBomber</a>, a handheld dot-matrix graffiti printer:</p>
<p><img class="alignnone size-full wp-image-27793" title="txtbomber" src="http://hackadaycom.files.wordpress.com/2010/08/txtbomber1.jpg" alt="" width="470" height="200" /></p>
<p>The width of the TRAKR is about the same as a sheet of paper. With <a href="http://hackaday.com/2010/02/17/robo-vibe/">a row of solenoids</a> and some paint markers, we could make a fantastic mess with this…or even simpler, skip the markers and head to the beach, having the TRAKR “comb” messages in the sand.</p>
<p>Problem is, we didn’t have a stack of solenoids on hand, and we wanted to get right into this rather than wait around for parts to arrive. Rooting among the detritus of our <a href="http://hackaday.com/2009/09/21/virtual-pool-real-world-interface/">secret underground vault</a>, we found a great substitute from a prior project: a row of 48 addressable LEDs driven by <a href="http://hackaday.com/2010/08/19/7-segment-sudoku/">shift registers</a>, the board on which they’re mounted perfectly matching the TRAKR’s 10 inch width! So our aim now was to achieve the same effect in light. The TRAKR moves too slowly for retinal <a href="http://hackaday.com/2010/03/20/pov-clock-inside-acrylic-block/">persistence of vision</a> to occur, but we could use <a href="http://hackaday.com/2009/12/28/lightdrawing-robot/">long exposure photography</a> to capture the results.</p>
<p><img class="alignnone size-full wp-image-27794" title="trakr-pov-mounted" src="http://hackadaycom.files.wordpress.com/2010/08/trakr-pov-mounted.jpg" alt="" width="470" height="220" /></p>
<p>Anyone can buy a TRAKR off the shelf now, but the light bar was something custom-made for a POV project. The good news is that it’s <a href="http://hackaday.com/2010/05/31/beginner-concepts-cascading-shift-registers/">a very common circuit, something we’ve linked to before</a>, and a slightly scaled-back version can be built on a breadboard. Ours has a set of six 75HC595 shift registers with decoupling caps, each driving eight LEDs with associated current-limiting resistors. Very similar to what’s shown in that article, but cascaded out to six chips. You could also do something similar (and <em>way</em> more colorful) <a href="http://hackaday.com/2009/06/29/parts-shiftbrite-rgb-led-module-a6281/">using ShiftBrite LEDs</a>.</p>
<p>The LED board is held to the ’bot with masking tape. Spared no expense!</p>
<p><img class="alignnone size-full wp-image-27888" title="trakr-headers" src="http://hackadaycom.files.wordpress.com/2010/09/trakr-headers.jpg" alt="" width="470" height="280" /></p>
<p>As pointed out in our <a href="http://hackaday.com/2010/08/30/spy-video-trakr-the-teardown/">teardown</a>, the all-important JACK3, containing the GPIO lines, is smack dab in the middle of the TRAKR main board. The unpopulated header USB2, which we’ll use as a power tap, is closer to the outside edge.</p>
<p><img class="alignnone size-full wp-image-27795" title="trakr-pov-wiring" src="http://hackadaycom.files.wordpress.com/2010/08/trakr-pov-wiring.jpg" alt="" width="470" height="320" /></p>
<p>In our haste to create a presentable demo, we just soldered wires directly to the TRAKR’s circuit board, but at some point intend to dismantle the thing again and solder on a proper header for inserting wires. For +5VDC and ground, the VDD5V and VGND pads of the idle USB connector are used. The shift registers require three data lines (as we’ll explain in a moment), and we opted to use the first GPIO lines on the board, labeled GPC0, GPC1 and GPC2.</p>
<p>The shift register interface, referred to as a <a href="http://hackaday.com/2009/06/30/parts-spi-eeprom-25aa25lc/">3-Wire</a> serial connection or sometimes SPI (Serial Peripheral Interconnect), is a <em>synchronous serial</em> interface, meaning that each bit of data is accompanied by the synchronized tick of a clock bit on another line. A third line, called the <em>latch</em>, signals the end of the data transmission — in the case of an 8-bit shift register, this will output on its 8 parallel data lines the last 8 bits that were “clocked in” over the serial connection.</p>
<p>For our light bar hack, we’ll use GPC0 as the clock line, GPC1 as the data line, and GPC2 as the latch. Most microcontrollers feature some kind of native 3-Wire/SPI support, but as mentioned earlier, with the TRAKR library at present we’ll have to trigger all these bits through software control.</p>
<p>Next thing we need is an image to display on the LEDs, one row at a time. Naturally, we’re going to use the Hack a Day logo:</p>
<p><img class="size-full wp-image-27796 alignnone" title="hadlogo" src="http://hackadaycom.files.wordpress.com/2010/08/hadlogo.png" alt="" width="96" height="120" /></p>
<p>In the source code archive provided later, the image is present as a 1-bit Windows BMP file, simple to work with because the data is uncompressed. The image is turned sideways as it requires less code for the program to decode each horizontal row of the bitmap than it would for processing vertical columns. It’s 48 pixels wide, corresponding to the 48 pixels in the LED bar, and 60 pixels high, including some blank lines at either end so repeated logos don’t run one into the next.</p>
<p>Our example program is hardcoded for this one demo image, which is embedded in the executable. A more sophisticated program might allow the user to load an image from the SD card, and would properly parse the BMP header to query the actual image dimensions. Again, we’re just looking to keep the code simple and not stretching out to hundreds of lines.</p>
<p><pre class="brush: cpp;">
// POV demo for Spy Video TRAKR w/shift register LED bar.

#include &quot;svt.h&quot;  // Official API
#include &quot;JAPI.h&quot; // Secret sauce

#define ROWS  60 // Image height in pixels
#define COLS  6  // Image width in bytes (pixels = 8x this)
#define PAD   (3 - ((COLS - 1) &amp; 3))
extern unsigned char _binary_logo_bmp_start[]; // In logo.o

#define CLOCK (1 &lt;&lt; 0)  // GPC0
#define DATA  (1 &lt;&lt; 1)  // GPC1
#define LATCH (1 &lt;&lt; 2)  // GPC2

void Start()
{
  JAPI_SetIoOutputMode(CLOCK | DATA | LATCH);
}

bool Run()
{
  unsigned char *ptr, byte;
  int r, c, b;

  // 62 byte offset to start of image data within BMP:
  // 14 byte BMP header, 40 byte DIB header, 8 byte palette
  ptr = &amp;_binary_logo_bmp_start[62];

  for(r=0; r&lt;ROWS; r++) {     // Each line in image
    for(c=0; c&lt;COLS; c++) {   // Each byte in line
      byte = *ptr++;
      for(b=128; b; b&gt;&gt;=1) {  // Each bit in byte
        if(byte &amp; b) JAPI_SetIoLow(DATA);
        else         JAPI_SetIoHigh(DATA);
        JAPI_SetIoHigh(CLOCK);
        JAPI_SetIoLow(CLOCK);
      }
    }
    JAPI_SetIoHigh(LATCH);
    JAPI_SetIoLow(LATCH);
    Sleep(20);
    ptr += PAD;  // BMP rows start on 4-byte boundary
  }

  return true;
}

void End()
{
}
</pre></p>
<p>The graphics-related #defines should be clear by now, we know this program is set up for this one specific image. The CLOCK, DATA and LATCH #defines correspond to the individual bits passed to GPIO-related functions, making subsequent code easier to read.</p>
<p>In the Start() function, the call to JAPI_SetIoOutputMode() initializes all three lines as outputs.</p>
<p>Because of the way the image is formatted, there’s minimal work now to be done in the Run() function. For each horizontal row of the image, six bytes of image data are output one bit at a time, 48 bits total: the DATA line is set either high or low to indicate the corresponding 1-bit pixel value, and then the CLOCK line is quickly toggled high and then low to “clock out” the data bit. At the end of each row, the LATCH line is similarly toggled to tell the shift registers to display the new data. A 20 millisecond delay holds the image for a moment so it’s not all scrunched together, given the TRAKR’s limited speed.</p>
<p>The next line advances the image pointer to the start of the next row, if required. In BMP files, rows are always a multiple of 4 bytes wide. Our bitmap is only 48 pixels (6 bytes) across, so this skips the two extra bytes at the end of each row. The final “return true;” line tells the TRAKR library to repeat our Run() function again indefinitely.</p>
<p>The End() function is empty for this program, but it still needs to be present to keep the linker happy.</p>
<p><a href="http://www.paintyourdragon.com/pov.zip">A ZIP file containing the above source code, bitmap image and makefile can be downloaded here</a>. Extract this archive within the Trakr.1 folder, alongside (not within) the Internals directory. “cd” to this directory and type “make”. If all goes as planned, this should produce the file POV.bin, which can be loaded on the TRAKR as described earlier.</p>
<p><img class="alignnone size-full wp-image-27804" title="trakr-pov2" src="http://hackadaycom.files.wordpress.com/2010/08/trakr-pov2.jpg" alt="" width="470" height="230" /></p>
<div>
<p>Something to consider when hanging circuitry off the TRAKR is the proximity to the 2.4 GHz antenna. We wasted a good half hour tracking down a “software bug” that in reality turned out to be our sloppy, long wires picking up radio interference (you can still see a few whacked-out pixels in the image above). Keep wire runs as short as possible, perpendicular to the antenna.</p>
<h2>Bright future</h2>
</div>
<p>Even in this early stage, warts and all, we’re quite excited by the prospects for this toy’s hackability. Wild Planet is to be applauded for their open-minded approach in encouraging software and hardware modifications. A lot of comparisons are already being made to the <a href="http://hackaday.com/2009/05/09/roomba-with-dustpan-style-grasper/">Roomba</a> and <a href="http://hackaday.com/2008/10/20/rovio-teardown/">Rovio</a>, both of which have spawned enthusiast sites and even books. Time will tell if the Spy Video TRAKR catches on the same way.</p>
<p><img class="alignnone size-full wp-image-27805" title="trakr-pov" src="http://hackadaycom.files.wordpress.com/2010/08/trakr-pov1.jpg" alt="" width="470" height="280" /></p>
<p>So that’s our TRAKR hack…now let’s see yours! When you’ve got something cool to showcase, don’t forget to <a href="http://hackaday.com/contact-hack-a-day/">tip us off</a>!</p>
<br />Filed under: <a href='http://hackaday.com/category/classic-hacks/'>classic hacks</a>, <a href='http://hackaday.com/category/how-to/'>how-to</a>, <a href='http://hackaday.com/category/robots-hacks/'>robots hacks</a>, <a href='http://hackaday.com/category/toy-hacks/'>toy hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/27791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/27791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/27791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/27791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/27791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/27791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/27791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/27791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/27791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/27791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/27791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/27791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/27791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/27791/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=27791&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2010/09/02/spy-video-trakr-software-and-first-hack/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">philburgess</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/08/trakr-hacked.jpg" medium="image">
			<media:title type="html">trakr-hacked</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/08/txtbomber1.jpg" medium="image">
			<media:title type="html">txtbomber</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/08/trakr-pov-mounted.jpg" medium="image">
			<media:title type="html">trakr-pov-mounted</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/09/trakr-headers.jpg" medium="image">
			<media:title type="html">trakr-headers</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/08/trakr-pov-wiring.jpg" medium="image">
			<media:title type="html">trakr-pov-wiring</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/08/hadlogo.png" medium="image">
			<media:title type="html">hadlogo</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/08/trakr-pov2.jpg" medium="image">
			<media:title type="html">trakr-pov2</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/08/trakr-pov1.jpg" medium="image">
			<media:title type="html">trakr-pov</media:title>
		</media:content>
	</item>
		<item>
		<title>Behind the scenes of a 1K graphics demo</title>
		<link>http://hackaday.com/2010/08/08/behind-the-scenes-of-a-1k-graphics-demo/</link>
		<comments>http://hackaday.com/2010/08/08/behind-the-scenes-of-a-1k-graphics-demo/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 19:00:01 +0000</pubDate>
		<dc:creator>Phil Burgess</dc:creator>
				<category><![CDATA[misc hacks]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[1K]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[demoscene]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=26950</guid>
		<description><![CDATA[Programmer/designer [Steven Wittens] has posted a fantastic write-up on the black art of producing compact demo code, dissecting his own entry in the 1K JavaScript Demo Contest. The goal is to produce the best JavaScript demo that can be expressed in 1024 characters or less and works reliably across all standards-compliant web browsers. [Wittens] details several techniques [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=26950&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-26957" title="1kdemo2" src="http://hackadaycom.files.wordpress.com/2010/08/1kdemo2.jpg" alt="" width="470" height="200" /></p>
<p>Programmer/designer [Steven Wittens] has posted a fantastic write-up on the <a href="http://acko.net/blog/js1k-demo-the-making-of">black art of producing compact demo code</a>, dissecting his own entry in the <a href="http://js1k.com/home">1K JavaScript Demo Contest</a>. The goal is to produce the best <a href="http://hackaday.com/2008/10/18/chrome-and-firefox-showing-javascript-improvements/">JavaScript</a> demo that can be expressed in 1024 characters or less and works reliably across all standards-compliant web browsers.</p>
<p>[Wittens] details several techniques for creating a lot of visual flash in very few bytes, including the use of <em>procedural graphics</em> rather than fixed datasets, exploiting <em>prime numbers</em> to avoid obvious repetitions in movement, and strategically <em>fudging</em> formulas to save space while adding visual interest. These methods are just as applicable to other memory-constrained situations, not just JavaScript — some of the contest entries bear a resemblance to the compact microcontroller demos we’ve <a href="http://hackaday.com/2010/05/01/phasor-av-pal-demo-uses-atmega88/">previously showcased</a>, except running in your browser window.</p>
<p>The contest runs through September 10th, allowing ample time to come up with something even more clever. Whether he wins or not, we think [Steven] deserves special merit on account of having one of the most stylish blogs in recent memory!</p>
<br />Filed under: <a href='http://hackaday.com/category/misc-hacks/'>misc hacks</a>, <a href='http://hackaday.com/category/software-development/'>Software Development</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/26950/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/26950/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/26950/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/26950/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/26950/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/26950/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/26950/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/26950/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/26950/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/26950/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/26950/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/26950/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/26950/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/26950/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=26950&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2010/08/08/behind-the-scenes-of-a-1k-graphics-demo/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">philburgess</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/08/1kdemo2.jpg" medium="image">
			<media:title type="html">1kdemo2</media:title>
		</media:content>
	</item>
		<item>
		<title>Art From Code: Generative Graphics</title>
		<link>http://hackaday.com/2008/10/20/art-from-code-generative-graphics/</link>
		<comments>http://hackaday.com/2008/10/20/art-from-code-generative-graphics/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 23:01:04 +0000</pubDate>
		<dc:creator>Kimberly Lau</dc:creator>
				<category><![CDATA[downloads hacks]]></category>
		<category><![CDATA[misc hacks]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[algorithmic art]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[generative art]]></category>
		<category><![CDATA[graphics]]></category>

		<guid isPermaLink="false">http://hackadaycom.wordpress.com/?p=4967</guid>
		<description><![CDATA[[Keith Peters]&#8216; blog Art From Code is devoted to his beautiful graphics from computer source code, also known as generative art. Although [Peters] is reluctant to reveal his source code, algorithmic graphics can be created with the help of tools like ActionScript, Flash, and Flex. There are some great tutorials that can start you on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=4967&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-4998" title="art-from-code2" src="http://hackadaycom.files.wordpress.com/2008/10/art-from-code2.jpg" alt="" width="450" height="149" /></p>
<p>[Keith Peters]&#8216; blog <a href="http://www.artfromcode.com">Art From Code</a> is devoted to his beautiful graphics from computer source code, also known as <a href="http://en.wikipedia.org/wiki/Generative_art">generative art</a>. Although [Peters] is <a href="http://www.artfromcode.com/?p=319">reluctant</a> to reveal his source code, algorithmic graphics can be created with the help of tools like <a href="http://www.mahalo.com/Actionscript">ActionScript</a>, <a href="http://www.mahalo.com/Flash">Flash</a>, and Flex. There are some <a href="http://www.computerarts.co.uk/tutorials/premium_content/web__and__new_media/creating_generative_art_with_flash">great</a> <a href="http://flashenabledblog.com/2008/08/08/tutorials-generative-recursive-art-roundup/">tutorials</a> that can start you on the path to making your own evocative art.</p>
<p>[via <a href="http://www.neatorama.com/2008/10/19/art-from-code-turning-computer-codes-into-visual-art/">Neatorama</a>]</p>
<br />Posted in downloads hacks, misc hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/4967/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/4967/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/4967/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/4967/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/4967/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/4967/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/4967/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/4967/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/4967/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/4967/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/4967/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/4967/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/4967/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/4967/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=4967&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2008/10/20/art-from-code-generative-graphics/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Kimberly Lau</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/10/art-from-code2.jpg" medium="image">
			<media:title type="html">art-from-code2</media:title>
		</media:content>
	</item>
		<item>
		<title>LCD projector repair</title>
		<link>http://hackaday.com/2008/05/25/lcd-projector-repair/</link>
		<comments>http://hackaday.com/2008/05/25/lcd-projector-repair/#comments</comments>
		<pubDate>Sun, 25 May 2008 18:00:00 +0000</pubDate>
		<dc:creator>Will O'Brien</dc:creator>
				<category><![CDATA[classic hacks]]></category>
		<category><![CDATA[home entertainment hacks]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[hometheater]]></category>
		<category><![CDATA[ht]]></category>
		<category><![CDATA[parts]]></category>
		<category><![CDATA[projector]]></category>
		<category><![CDATA[repair]]></category>

		<guid isPermaLink="false">http://hackaday.iheartcashews.com:8181/2008/05/25/lcd-projector-repair/</guid>
		<description><![CDATA[[Kieth] picked up an Infocus projector only to find that it needed some repair. The polarizer on the blue light path was toast. When he parted out an Optoma projector he scored a polarizer that was just about right for the repair. It&#8217;s a good read even if you don&#8217;t have a projector in pieces [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=1875&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img width="400" vspace="4" hspace="4" height="325" border="0" alt="" src="http://hackadaycom.files.wordpress.com/2008/05/pj-repair-had.jpg?w=400&#038;h=325" /><br />[Kieth] picked up an Infocus projector only to find that it <a href="http://www.neufeld.newton.ks.us/electronics/?p=237">needed some repair</a>. The polarizer on the blue light path was <a href="http://www.neufeld.newton.ks.us/electronics/?p=212">toast</a>. When he <a href="http://www.neufeld.newton.ks.us/electronics/?p=235">parted out</a> an Optoma projector he scored a polarizer that was just about right for the repair. It&#8217;s a good read even if you don&#8217;t have a projector in pieces at the moment. He ended up bending the mounting bracket a bit to hold the filter and got his projector fully up and running again.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hackadaycom.wordpress.com/1875/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hackadaycom.wordpress.com/1875/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/1875/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=1875&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2008/05/25/lcd-projector-repair/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Will O&#039;Brien</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/05/pj-repair-had.jpg" medium="image" />
	</item>
	</channel>
</rss>
