<?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>hackniac</title>
	<atom:link href="http://www.hackniac.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.hackniac.com/blog</link>
	<description>Ideas of a young hacker. Beware.</description>
	<lastBuildDate>Tue, 08 May 2012 21:36:44 +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>Satellites You Say? In Space?</title>
		<link>http://www.hackniac.com/blog/?p=1175</link>
		<comments>http://www.hackniac.com/blog/?p=1175#comments</comments>
		<pubDate>Sun, 15 Apr 2012 22:07:55 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[Status]]></category>
		<category><![CDATA[ersat]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[satellite]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=1175</guid>
		<description><![CDATA[No no no. Unfortunately no. My ersat project has been on the rocks for the past month (or two?) because of the recent intensifying of the helter-skelter pitter-patterings of my life. However, today marks the start of a new stage in the project, in a completely new direction. I have a sensor module constructed, and <a href='http://www.hackniac.com/blog/?p=1175' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>No no no. Unfortunately no. My <a title="Ersat Teaser" href="http://www.hackniac.com/blog/?p=863">ersat project</a> has been on the rocks for the past month (or two?) because of the recent intensifying of the helter-skelter pitter-patterings of my life. However, today marks the start of a new stage in the project, in a completely new direction.</p>
<p>I have a sensor module constructed, and that&#8217;s about it. There are chunks of a power module and a prototype command module, but chunks don&#8217;t make a satellite and I&#8217;ve got to present in less than a month! Hardware development is slow, and finishing a physical ersat in the time remaining is now hopeless. So instead of giving up I&#8217;m fighting back with software. In the next month I&#8217;m going to concoct an amalgam of the hardware I&#8217;ve already got and pieces of software that I&#8217;ve been cooking for parallel projects over the past year. The end result will be a strange, fully interactive simulation of a live ersat network (which itself is an approximation of a real satellite network).</p>
<p>It&#8217;s all just now coming together, so I&#8217;ll end here for now with a picture that will hopefully convey the essence:</p>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/04/softersat.jpg"><img class="alignleft size-full wp-image-1176" title="softersat" src="http://www.hackniac.com/blog/wp-content/uploads/2012/04/softersat.jpg" alt="" width="1447" height="1887" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=1175</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blue TILP</title>
		<link>http://www.hackniac.com/blog/?p=1139</link>
		<comments>http://www.hackniac.com/blog/?p=1139#comments</comments>
		<pubDate>Mon, 09 Apr 2012 21:10:24 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Modification]]></category>
		<category><![CDATA[Utility]]></category>
		<category><![CDATA[attiny]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[calculator]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[mod]]></category>
		<category><![CDATA[texas instruments]]></category>
		<category><![CDATA[ti link protocol]]></category>
		<category><![CDATA[tilp]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=1139</guid>
		<description><![CDATA[I&#8217;ve made my TI-84+ bluetooth-capable using an RN-42 module and an Attiny85. It now shows up as an bluetooth SPP to any nearby bluetooth-capable devices, but looks completely normal (at least on the outside). The system allows the calculator to be communicated with over bluetooth as if there was a normal direct wired connection to it. <a href='http://www.hackniac.com/blog/?p=1139' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/03/calc_front.jpg"><img class="alignleft size-full wp-image-1140" title="calc_front" src="http://www.hackniac.com/blog/wp-content/uploads/2012/03/calc_front.jpg" alt="" width="695" height="765" /></a></p>
<p>I&#8217;ve made my TI-84+ bluetooth-capable using an <a href="http://www.sparkfun.com/products/10253">RN-42 module</a> and an Attiny85. It now shows up as an bluetooth SPP to any nearby bluetooth-capable devices, but looks completely normal (at least on the outside). The system allows the calculator to be communicated with over bluetooth as if there was a normal direct wired connection to it. The calculator just sees data coming in as if it were being sent from another calculator or a PC. It still allows the calculator&#8217;s link port to be used normally.</p>
<p>I plan on using my calculator&#8217;s new wireless linking ability to give it super-powers. So far I&#8217;ve only used it in a simple chat program, but eventually it will give my calculator the ability to explore complicated 3D graphs and have integrated WolframAlpha access, among many other useful things. It&#8217;s great advantage lies in its ability to turn my calculator, which by now is almost an extension of my own body, into an interface to any other bluetooth-capable device I want to use it with.</p>
<h3>The Hardware</h3>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/03/blue_tilp_guts1.jpg"><img class="alignleft size-full wp-image-1141" title="blue_tilp_guts1" src="http://www.hackniac.com/blog/wp-content/uploads/2012/03/blue_tilp_guts1.jpg" alt="" width="695" height="710" /></a></p>
<p>The Attiny85 that serves as the brain of the project has been put into a rather odd configuration. I bent half of its pins across its bottom so that it could be soldered to a 2&#215;4 male header. Doing this makes it into a plug that can be disconnected for programming and then easily plugged back into the female header inside the calculator. Through that header the Attiny85 is connected to the ring and tip lines heading to the TI link port on my calculator, to the reset and serial lines of the bluetooth module, to 3.3v and to ground.</p>
<p>Power is a trick in this design, for two reasons. The first is that the Attiny85 is a 5v device, but I&#8217;m connecting it to a 3.3v bluetooth module directly. That&#8217;s workable because I&#8217;m running the Attiny85 at 3.3v instead of 5v. Reducing the voltage like this does not seem to cause problems, even though it is at the edge of the spec for the chip.</p>
<p>The second problem is that the power supply never shuts off. The calculator is always &#8216;running&#8217;, but it goes to sleep when the user presses the off button. Right now I don&#8217;t have any method to deal with that implemented, so my added hardware will suck the calculator dry of power much faster than the time it would have taken the calculator to run dry on its own. However, there is a relatively easy solution. The Attiny85 just needs to figure out when the calc is asleep and then go into a sleep mode itself. This should reduce power consumption very substantially, but I haven&#8217;t yet figured out a good way for the microcontroller to know when the calculator is asleep.</p>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/03/blue_tilp_brain.jpg"><img class="alignleft size-full wp-image-1142" title="blue_tilp_brain" src="http://www.hackniac.com/blog/wp-content/uploads/2012/03/blue_tilp_brain.jpg" alt="" width="695" height="528" /></a><br />
&nbsp;</p>
<h3>Implementing the TI Link Protocol</h3>
<p>I&#8217;ve made many attempts at reverse-engineering the TI Link protocol over the past few years, and none have been totally successful until now. Communication was so bothersome with the built-in protocol when I made those other attempts that I went as far as to implement UART to use instead (see <a title="TI Calc Touch Screen Mod" href="http://www.hackniac.com/blog/?p=365">this</a> project for that code).</p>
<p>However, as I&#8217;ve been encountering a lot lately, things I&#8217;ve failed at before are now easily accomplished because of all the knowledge I&#8217;ve gained in the interim. I can&#8217;t pin down exactly what I didn&#8217;t understand before about the TILP, but this time I had no trouble implementing it. The Attiny85 can talk easily with the calculator&#8217;s operating system directly, without needing software modification on the calculator.</p>
<h3>Creating a Transparent Link</h3>
<p>Once I had the Attiny85 talking to the calculator and talking to the bluetooth module separately, I tried to combine them so that the Attiny85 would be the invisible translator in-between the two. It turned out to be fairly easy to pull off, although it required one bothersome trade-off.</p>
<p>With nothing happening the Attiny85 is actively listening for communication from the calculator. If it receives data from the calculator it passes it straight onto the bluetooth module at 115200 baud serial (implemented in software since the Attiny85 does not have UART hardware). I set up an interrupt for incoming serial communications from the bluetooth module. UART is a timing-critical protocol so I couldn&#8217;t really get around this. The interrupt writes whatever the incoming data is to a FIFO buffer as quickly as possible for later processing. As long as the Attiny85 sees nothing from the calculator it empties the FIFO buffer over to the calculator.</p>
<p>This allows two-way asynchronous communication to occur. It works fairly well because the TI link protocol is not a timing-critical protocol (to an extent), so it isn&#8217;t usually bothered when the UART interrupt slows down receiving or transmitting. However, I have noticed that it fails if delayed more than a certain amount. This is a problem if a long continuous message comes in over bluetooth. It causes only the first part of the message to get through.</p>
<p>The only way I see to resolve this problem is by creating packets with a length field for the incoming data so that the microcontroller knows when there is a contiguous transmission and how long it will be, so it won&#8217;t start talking to the calculator until all of the data is received. This should prevent communications with the calculator from being interrupted as badly.</p>
<h3>Next Steps</h3>
<p>I&#8217;ve got to make the communications more reliable and fix the power issue. Then I can move onto developing software that makes good use of the wireless connection. The principal device that I will be using my bluetooth calculator with is my tablet computer (running Android). I carry it with me everywhere. including school, so it would be the best device to use to wirelessly extend the capabilities of my calculator. I&#8217;m most interested in getting my tablet to perform intensive 3D graphing and to allow my calculator access to WolframAlpha. It should turn in a very useful tool for college.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=1139</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Happy Demos and a Calculator Dump</title>
		<link>http://www.hackniac.com/blog/?p=1107</link>
		<comments>http://www.hackniac.com/blog/?p=1107#comments</comments>
		<pubDate>Fri, 16 Mar 2012 20:51:06 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Demo]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Status]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[texas instruments]]></category>
		<category><![CDATA[ti 83 +]]></category>
		<category><![CDATA[ti 84 +]]></category>
		<category><![CDATA[ti calculator]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=1107</guid>
		<description><![CDATA[Last week I received an extremely awesome and possibly life-changing opportunity. As a result I became a little feverish with excitement and stopped work on my long term projects. Instead I made a slew of short fun demos on my calculator and elsewhere. I&#8217;m going to take this as an opportunity to show the fun <a href='http://www.hackniac.com/blog/?p=1107' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Last week I received an extremely awesome and possibly life-changing opportunity. As a result I became a little feverish with excitement and stopped work on my long term projects. Instead I made a slew of short fun demos on my calculator and elsewhere. I&#8217;m going to take this as an opportunity to show the fun things that I&#8217;ve done with my calculator.</p>
<p>Here is a backup file containing what I&#8217;ve currently got on my TI-84+. It&#8217;s nowhere near everything I&#8217;ve ever done (I&#8217;ll post the rest when/if I find them), but it&#8217;s a large chunk of what I&#8217;ve done on it this year and last year.</p>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/04/calc_all_4-9-12.zip" class="download">Download calculator backup</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=1107</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gameboy Camera Successfully Hacked</title>
		<link>http://www.hackniac.com/blog/?p=1122</link>
		<comments>http://www.hackniac.com/blog/?p=1122#comments</comments>
		<pubDate>Sun, 11 Mar 2012 21:27:21 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Demo]]></category>
		<category><![CDATA[Modification]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[gameboy]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[nintendo]]></category>
		<category><![CDATA[satellite]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=1122</guid>
		<description><![CDATA[I&#8217;ve been working very hard on my ersat project this past week. In particular I am trying to finish the sensor module for Ersat 1 (the first working prototype for my demonstration). It has an entire suite of sensors, but the central one is a Gameboy Camera. I want the module to be able to take <a href='http://www.hackniac.com/blog/?p=1122' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/03/gameboy_cam.png"><img class="size-full wp-image-1123 aligncenter" title="gameboy_cam" src="http://www.hackniac.com/blog/wp-content/uploads/2012/03/gameboy_cam.png" alt="" width="568" height="652" /></a></p>
<p style="text-align: left;">I&#8217;ve been working very hard on my <a title="Ersat Teaser" href="http://www.hackniac.com/blog/?p=863">ersat project</a> this past week. In particular I am trying to finish the sensor module for Ersat 1 (the first working prototype for my demonstration). It has an entire suite of sensors, but the central one is a Gameboy Camera. I want the module to be able to take low-res pictures to send over the ersat network, mostly to give it the feel of a Cold-War era spy satellite, and after some research I decided that the odd Gameboy Camera peripheral would work perfectly. It is cheap and easy to buy online, and it has a fairly simple interface. As an awesome bonus, the very odd &#8220;Artificial Retina&#8221; sensor chip used in the Gameboy Camera can do some simple image processing on its own, reducing the computational load for the guts of Ersat 1.</p>
<p style="text-align: left;">I thought that getting pictures of of it would be a snap and take at most a few days. As usual, that was an optimistic guess. It has taken a little over a week of days working maybe 1-2 hours each to get it up and running. I took 2 other stabs at it during that time before settling on what I have now.</p>
<p style="text-align: left;">Surprisingly, the challenging aspect wasn&#8217;t software or hardware. The solution I came up with is simple on both counts. The challenge was overcoming laziness. There is a straightforward datasheet freely available for the artificial retina chip in the Gameboy Camera, but I didn&#8217;t want to delve into that if I didn&#8217;t have to, so at first I scoured the web for projects that other people have  already done with it. That search turned up a lot of results, so I thought I was set. Unfortunately it led to a crazy looping path of madness as I tried to get code written by other people to work with my hardware (and a really pitiful spiral of depression as I fought to not spend time completely reformatting/rewriting some horrifically ugly code that one of them wrote).</p>
<p style="text-align: left;">I attempted to make sense of two projects done by other people before I gave up and made my own solution from scratch using just the information in the datasheet. It has taken 3 days and been a straightforward process. I wish I had started from scratch to begin with. For newbies (like me) out there who want to take some of the pain out of this kind of thing, here&#8217;s an outline of the process to get something like this up and running:</p>
<ol>
<li>Read the datasheet. It&#8217;s some of the most boring reading material in the world (just a bit more exciting than EULAs I think), but reading it will give you a sense of what needs to be made and forewarning of gotchas that might lead to days of frustration if missed. Skimming works well for me. I make a list of the basic requirements that must be fulfilled to talk to whatever device it is while I read.</li>
<li>Implement the communication and test it! Sometimes writing custom code is not required here and a library will suffice, but if that&#8217;s the case make sure to test it before continuing. I used my logic analyzer to verify without doubt that the signals were being shuffled around correctly, but often requesting a specific response from the target works just as well.</li>
<li>Incrementally build up the functionality. Don&#8217;t shoot for the full prize right away. In the past I had a lot of trouble with this. I often spent a long time writing ambitious code and then found out that it was fundamentally wrong and had to be rewritten. Even if it takes a significant amount of time, come up with incremental goals to complete before attempting the big end one.</li>
</ol>
<h3>The Solution</h3>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/03/GB_cam_test_lores.jpg"><img class="alignleft size-full wp-image-1135" title="GB_cam_test_lores" src="http://www.hackniac.com/blog/wp-content/uploads/2012/03/GB_cam_test_lores.jpg" alt="" width="695" height="404" /></a></p>
<p>&nbsp;</p>
<p>I wrote some simple code in C for an Atmega328p to communicate with the Gameboy Camera. In my demonstration application (the source code can be downloaded below) it uses this code to ask the Gameboy Camera for a picture when prompted over serial by a Java (Processing environment) application running on a PC. The cam then takes a picture and sends it pixel by pixel to the Atmega328p, which in turn sends the pixels over serial to the Java application to be drawn. Within the Java application a mouse click will take a picture, the o, v, and g keys switch modes, and the x position of the mouse sets a camera value denoted by the mode (offset, vref, and gain). The serial communication is very slow, so even though the picture is only 128&#215;128 pixels in 256 level grayscale it takes a few seconds for it to get scanned onto the computer.</p>
<h3 style="text-align: left;">Download source code:</h3>
<p>I put this code out there to help others like me who want to use this cool device, and anyone else who is interested.</p>
<p class="download" style="text-align: left;"><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/03/AVR-GB-Camera-Interface.zip">AVR GB Camera Interface</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=1122</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNA, Mutagens, Obsessions</title>
		<link>http://www.hackniac.com/blog/?p=1109</link>
		<comments>http://www.hackniac.com/blog/?p=1109#comments</comments>
		<pubDate>Fri, 02 Mar 2012 02:49:12 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Status]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=1109</guid>
		<description><![CDATA[I&#8217;m currently beset by unfortunately massive volumes of school work. The little time on the side that I have had has been devoted to making incremental additions to my ersat project. However, today that routine was not followed. I have been reading Silent Spring, which is the book that in large part sparked the environmental <a href='http://www.hackniac.com/blog/?p=1109' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently beset by unfortunately massive volumes of school work. The little time on the side that I have had has been devoted to making incremental additions to my ersat project. However, today that routine was not followed. I have been reading Silent Spring, which is the book that in large part sparked the environmental movement, admittedly for a school assignment. I reached a chapter about the genetic damage that certain chemicals are able to create in plants and animals &#8211; and very suprisingly, was deeply inspired.</p>
<p>In particular it was the word &#8220;mutagen&#8221; that did it. A mutagen is simply any chemical that can change the genetics of a form of life. It creates mutations. The word immediately brought back strong memories of projects I have done relating to genetics from long ago to the present. The subject fascinates me and has inspired many of my favorite creations (ironically though, the greater subject of biology bores me to death). I started thinking along the same lines that led to those creations, but in the context of the things that I am creating now. The lines of thought quickly converged on the hazy outline of a new project.</p>
<p>Unfortunately it is little different than most of my other projects inspired by genetics, and unfortunately I have no time to work on a new project. But that&#8217;s no fun! It&#8217;s always that state of things. Where has my sense of ambition gone? I&#8217;m taking this new project and running with it. The time needed to nourish it will either manifest itself as ooze from between the activities currently stacked tightly in my days, or it will assert its life and exert force enough to make room.</p>
<p>So this marks the taking-hold of a new seed of obsession. The details of the project are irrelevant for now (although their future disclosure is a sure thing). My intention here is to capture some inkling of the form my creativity takes. The urge to write this came out of the joy that burst out of that inspiration I happened upon while reading. I do enjoy that book, but when I remembered my old ideas and started churning them anew it was like something colorful finally bloomed out of the dead and colorless weight of it.</p>
<p>This intensity is born of contrast. Lately my inspiration and ambition have been sapped by work done for the sake of others. My schoolwork does not challenge me, but it does not disagree with me either. I&#8217;ve just sat complacent in the comfy chair in my room every day for hours obediently evaluating calculus expressions and writing essays, and generally being a good student, but going through the motions for the sake of my teachers and parents and not myself. I argue with myself that it&#8217;s doing me good. It is doing me good. But I don&#8217;t feel that it is and I know why. Making my obsessions settle for the scraps of time left by these other activities, foisted on me, makes me feel like I&#8217;m running in place. This homework and schoolwork is definitely giving me new tools. But these are tools other people think I will need. These are tools other people think they need to give to me; force onto me.</p>
<p>I don&#8217;t like others helping me against my will. Everything I do that is worthwhile starts with me. I take an interest. I conceive my creations. I figure out how to accomplish them. I savor the meaning that goes along with them. I burn my own fuel, have my own motivation, and I don&#8217;t want a transplant from anyone else &#8211; however kindly it is offered. The only successes I have had that count have fed on only my own energy from happy birth to timely death.</p>
<p>The intensity with which I feel this, whether due to legitimacy or my youth, explains for me my current dissatisfaction with school. For you I hope it explains why, and how, I am able to create the things that I show here. It&#8217;s why I describe my projects as a reason for living and my true passion. With luck I will keep the ability to love them this strongly, but steps must be taken to protect it into the future. Especially now as I ready myself for the first big transition towards independence that I will experience in my life. So I&#8217;ll keep up a frenzy of building my machines and writing down my ideas &#8211; creating &#8211; and everything else can feed on the ooze from that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=1109</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symbolic Note System</title>
		<link>http://www.hackniac.com/blog/?p=1094</link>
		<comments>http://www.hackniac.com/blog/?p=1094#comments</comments>
		<pubDate>Tue, 07 Feb 2012 01:19:15 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Thought]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=1094</guid>
		<description><![CDATA[I&#8217;m reading a book called The Plague for my english class and it has triggered an idea for a new note-taking system. The book will be the source of an essay that I will have to write in a month, so I am taking detailed notes while reading it. At first I wrote them on <a href='http://www.hackniac.com/blog/?p=1094' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m reading a book called The Plague for my english class and it has triggered an idea for a new note-taking system. The book will be the source of an essay that I will have to write in a month, so I am taking detailed notes while reading it. At first I wrote them on paper, then I tried taking them digitally, but neither worked perfectly. Digital notes can be searched and indexed, but require a clunkier process than simply writing on paper. But paper notes are messy and hard to navigate. What I need is a fast and highly organized system.</p>
<p>The insight I&#8217;ve had involves making the computer &#8216;understand&#8217; the notes, giving it the capability to make inferences about meaning that speed up the collection of information. To give a concrete example, my system would be able to recognize and properly respond to synonyms, so if Bob the butcher killed someone then a reference to &#8220;Bob&#8221; or &#8220;the butcher&#8221; would be understood to mean the same thing by the computer. This has been attempted by many people over the years, but I think I might be onto something with the way I&#8217;m planning on making it work. I think the trick is to take the fullest advantage of the human note-taker possible, and get them to do the tricky categorization on the fly. That way the problem turns into figuring out how to store the information and relationships within it, and having a user interface that is efficient.</p>
<p>I&#8217;m thinking about putting together some kind of prototype of this idea in the near future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=1094</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tiny Miasmata</title>
		<link>http://www.hackniac.com/blog/?p=974</link>
		<comments>http://www.hackniac.com/blog/?p=974#comments</comments>
		<pubDate>Thu, 02 Feb 2012 02:01:34 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Demo]]></category>
		<category><![CDATA[Favorites]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[attiny]]></category>
		<category><![CDATA[attiny2313]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[bit]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[chip]]></category>
		<category><![CDATA[chiptune]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[demoscene]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[dip]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hackniac]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[Integrated Circuit]]></category>
		<category><![CDATA[isp]]></category>
		<category><![CDATA[lcd]]></category>
		<category><![CDATA[machine]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[maker]]></category>
		<category><![CDATA[mcu]]></category>
		<category><![CDATA[micro]]></category>
		<category><![CDATA[microcomputer]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[nokia3310]]></category>
		<category><![CDATA[plastic]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[protoboard]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[pwm]]></category>
		<category><![CDATA[small]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[solder]]></category>
		<category><![CDATA[speaker]]></category>
		<category><![CDATA[tiny]]></category>
		<category><![CDATA[transistor]]></category>
		<category><![CDATA[wire]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=974</guid>
		<description><![CDATA[Tiny Miasmata is the first demo that I have created for my new demo platform, the Demomite.The platform is a handheld game device like the Gameboy, and as such it has game controls (an N.E.S. controller), a screen, and sound output. The hardware is very basic. I designed with the sole purpose of providing a <a href='http://www.hackniac.com/blog/?p=974' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><center><iframe src="http://www.youtube.com/embed/VuSIB_ByOiU" frameborder="0" width="640" height="480"></iframe></center></p>
<hr />
<p>Tiny Miasmata is the first demo that I have created for my new demo platform, the <a title="Demomite" href="http://www.hackniac.com/blog/?p=927">Demomite</a>.The platform is a handheld game device like the Gameboy, and as such it has game controls (an N.E.S. controller), a screen, and sound output. The hardware is very basic. I designed with the sole purpose of providing a very challenging plaform for writing software demos. The hardware itself is a demo, showing what I can do with some spare parts and a day of hard work (see a timelapse of that day <a title="Demomite Making-of Timelapse" href="http://www.youtube.com/watch?v=cQv1nFnKGu0" target="_blank">here</a>).</p>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_use_title_fix.jpg"><img class="alignleft size-full wp-image-1086" title="demomite_use_title_fix" src="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_use_title_fix.jpg" alt="" width="695" height="615" /></a></p>
<h2>Purpose</h2>
<p>This game I&#8217;ve made for the <a title="Demomite" href="http://www.hackniac.com/blog/?p=927" target="_blank">Demomite </a>is designed to give a taste of the capabilities of the hardware (much greater than would appear at first), but more importantly to show the colleges I have applied to that I know my stuff. With that latter goal in mind some of my more restrictive design choices make sense, like limiting myself artificially to 1 bit sound and only the internal 128 bytes of RAM when the Attiny2313 brain of the <a title="Demomite" href="http://www.hackniac.com/blog/?p=927" target="_blank">Demomite </a>is actually capable of much more with the help of a few outside parts.</p>
<p>&nbsp;<br />
<iframe width="640" height="360" src="http://www.youtube.com/embed/P5NU-yRJTLU" frameborder="0" allowfullscreen></iframe></p>
<hr />
<h2>The Game</h2>
<table border="0">
<tbody>
<tr>
<td><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_corrupt-e1328138412906.jpg"><img class="size-thumbnail wp-image-1009 alignleft" title="demomite_play_corrupt" src="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_corrupt-150x150.jpg" alt="" width="150" height="150" /></a></td>
<td><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_transmute-e1328138438799.jpg"><img class="size-thumbnail wp-image-1008" title="demomite_play_transmute" src="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_transmute-150x150.jpg" alt="" width="150" height="150" /></a></td>
<td><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_cut-e1328138454825.jpg"><img class="aligncenter size-thumbnail wp-image-1007" title="demomite_play_cut" src="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_cut-150x150.jpg" alt="" width="150" height="150" /></a></td>
</tr>
</tbody>
</table>
<p>Tiny Miasmata takes advantage of what is available within those strict limits. The game is a stripped down version of a PC game that I&#8217;ve been working on in Ruby, simply called Miasmata. It was very challenging to manage the basic aspects of the game within the limited hardware and the limited development time available to me, but also lots of fun.</p>
<p>It is a side-scroller. The player can walk around and jump in order to navigate the world, which is composed of 8&#215;8 pixel tiles. Only one tool is available to the player to use to interact with the world: corruption. By hitting the B button the space in front of the player is blasted with random data, giving uncertain results. Sometimes it will change the world in a way that the player wants (cutting through the tree in the picture above), and sometimes it will cause problems. Because of that it makes for an interesting game mechanic, forcing the player to be conservative with its use. The only goal to the game is finding The Enemy wherever he is out in the world and killing him by through corruption.</p>
<p>A lot of work went into making this demonstration of my software skills. Several challenging problems had to be overcome in order to get it working, and it had to be done very quickly. Demomite was built in a Sunday and Tiny Miasmata was finished by the end of the following week. This description covers the most significant challenges I encountered during this project, but I encourage you to take a look at the code yourself to see its full complexity (link at the bottom of this post).</p>
<h3>Sound</h3>
<p>The black and white graphics are very basic, but a little bit of sound adds some richness and color to the world. I managed both music and sound effects by taking advantage of two very useful features of the Attiny2313 MCU: hardware pulse-width modulation (PWM) and timer interrupts. The PWM allows me to output nearly any audible frequency continuously without wasting any CPU time. That means that I can play a tone while doing other stuff in the game, but a solid tone would get annoying very fast and is not very interesting, so I used the other feature, timer interrupts, to add some variation. An interrupt allows an external event, in this case a timer, to pause execution of the current code to execute it&#8217;s own code associated with it and then resume execution of the original code. The interrupt code I wrote for Tiny Miasmata simply updates the tone playing via PWM from a series of values stored in memory that constitute a &#8220;song&#8221; (quotes because I am not a musician, so it sounds fairly horrible). This all means that I can easily play some music in the background without worrying about dividing CPU time between the game and the music.</p>
<p>Music: <a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/song.wav">song</a></p>
<p>However, the sound effects are handled in a slightly different way because of their nature. The two sound effects I have included are one for when the player attacks, and one for when the player dies. In both cases I found the best strategy was to modify the PWM by both the timer interrupt and the CPU at the same time, because for both I was going for a random sound that would give the sense of corruption, the theme of the game (and it was easiest and took up the least space).</p>
<p>Effect #1: <a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/corruption.wav">corruption</a></p>
<p>Effect #2: <a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/death.wav">death</a></p>
<h3>World</h3>
<p>In terms of complexity, the system that handles the map for Tiny Miasmata is the most impressive part of the project. A key aspect of the full game is a nearly limitless world. On the PC I accomplish that through procedural generation using a random seed, but that approach is much more difficult on the Demomite because of the limited resources. I tried a few approaches that would generate a map from the program data itself as the seed, but the results were never satisfactory and took up a very large space. I settled on a simpler strategy that actually proved to be much more flexible &#8211; simply loading a pregenerated map from memory. To tell the truth it was a bit of a disappointment to have to change course (I really love the concept of procedural generation), but it provided fun new challenges to surmount.</p>
<p><strong>Storage problem</strong></p>
<div>The foremost problem was the matter of storage. I only had 2K of program flash to work with, which is primarily needed to store the code. The paltry 128 bytes of RAM was about one fourth used up by the stack, and the EEPROM is too slow, small, and complex to utilize for the maps. I decided that I would take advantage of both the RAM and the program flash, splitting the task between both in a compromise that would use up less space while being very computationally efficient.</div>
<p><strong>Compressing the map</strong></p>
<div>To store the actual map I developed a simple compression algorithm. It came about after researching the modern types of compression algorithms that are used everyday, but it was not based on those, just inspired by them. It&#8217;s a simple kind of indexing system. Each &#8220;screenful&#8221; is stored separately, and is constrained in the following way to reduce the storage size: Only 4 tile types can be on a single screen, which means that each tile can be expressed as two bits. The screen is 10&#215;6 tiles in size, so there are 60 tiles on each screenful and it only takes 15 bytes to store them. However, I designed more than 4 tiles into the game. To get around the 4 tile-per-screenful limit I added a header at the beginning of each screenful. The header indexes a two byte value in a &#8220;group table&#8221;. Each entry in the group table is a combination of tiles, which allows the (up to) 4 tile types used on a given screen to be looked up and decoded. Altogether this means that each screenful takes 16 bytes, which makes the indexing math beautifully simple, and the only annoying bit is that there must be a small group table floating around somewhere to be used to decode the map.</div>
<p><strong>Decompressed in RAM</strong></p>
<div>Using this compression scheme allowed me to fit a 4&#215;3 screen map (720 tiles) into the memory I had left over after writing the game logic. Unfortunately, the compression makes it very difficult and slow to interact with the map from the perspective of the game logic. My solution to that was to decompress a screenful into a section of RAM to interact with it. In its decompressed form it is composed of 1 nibble per tile (there are less than 16 tiles in the game so this is sufficient), bringing the space needed to 30 bytes. This simplifies programming collision detection and other things that need to look at the map a lot because it turns into a simple matter of indexing the correct byte and then isolating the value of the correct nibble.</div>
<h3>Map editor</h3>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/mapper.png"><img class="aligncenter size-full wp-image-1029" title="mapper" src="http://www.hackniac.com/blog/wp-content/uploads/2012/02/mapper.png" alt="" width="653" height="517" /></a></p>
<p>So this compression stuff is all well and good from the point of view of the game, but what about from the perspective of the guy who has to generate the maps (namely, me)?  I could not practically create a table of values by hand to express a map in a way that could be assembled into the binary and decompressed by my map routines, I needed a way to easily edit maps and compress them automatically. To accomplish that I wrote an ugly Ruby script (included with source-code) that takes an image as input and outputs a text file with the group table and a series of tables for each screenful. From there I can just include it into the project within my assembler and it ends up in the binary while being easily pointed to by the rest of my code. I also took advantage of the Ruby game library I&#8217;ve been using for the PC version of Miasmata, called Gosu, to give the option of displaying a scrollable preview of the compressed map (seen above).</p>
<h3>Collision Detection</h3>
<p>Strangely enough this is where I had the most challenging code to write. The techniques for collision detection I used at first broke later on and I had to take another shot at the problem. Those early attempts were based on the positions of the tiles, only checking to see if something was in a given tile location. The later collision detection code is not at all complicated, just a little subtraction to check for collisions between squares, but for some reason it took a lot of effort to produce. I think that it might just be due to my poor ability to imagine how the overlapping objects corresponded to the math. In the end the solution I came up with works reliably, but it&#8217;s fairly clutsy. If I had the time to fully rewrite it I would expand its capabilities to objects that can move faster than 1 pixel per frame and do pixel-perfect collision or collision with bodies that can rotate. That would greatly improve the feel of the game, because the physics could be more natural, but would be much more challenging to code.</p>
<h3>The Enemy</h3>
<table border="0">
<tbody>
<tr>
<td><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_enemy1-e1328138518322.jpg"><img class="alignleft size-medium wp-image-1003" title="demomite_play_enemy" src="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_enemy1-300x255.jpg" alt="" width="300" height="255" /></a></td>
<td><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_death-e1328138469879.jpg"><img class="alignleft size-medium wp-image-1006" title="demomite_play_death" src="http://www.hackniac.com/blog/wp-content/uploads/2012/02/demomite_play_death-300x258.jpg" alt="" width="300" height="258" /></a></td>
</tr>
</tbody>
</table>
<p>I dug myself so deeply into the challenges associated with the game world and bringing the player to life within it that I neglected one of the most important part of any story, whether it is told by a game or not &#8211; the conflict. The player could move and jump and explore the world, but had nothing to do. I&#8217;ll admit that this part was almost an afterthought. When I reached the point of adding an enemy for the player to fight I was almost out of time to work. I basically copied the player&#8217;s code exactly and added a tiny bit of intelligence.</p>
<p>To simplify things there is only one enemy. He looks exactly like the player. If the enemy sees the player it will move towards the player and kill him or her on contact. Even though there is only one enemy, to the player it seems like there are many, although only one at a time. When the enemy dies he is recycled and spawned anew in another section of the world.</p>
<p>As a matter of necessity the player needs a way to fight the enemy. To that end I created the tool of corruption, which is the central theme of Miasmata. The world that the player inhabits is corrupted by the Miasma, but the player can do corrupting as well. In the PC version of the game this ability can be used to destroy as well as create, although which one is left up to chance. In that sense the power of corruption in Tiny Miasmata is much more blunt. The player can use corruption to randomly change the map nearby or kill the enemy. The changes are not saved and the enemy is never truly dead. Any use of corruption messes up the image on the screen and therefore makes it harder to tell what is going on.</p>
<p>Conclusion</p>
<p>This is the most difficult software project I have ever taken on (or at least that I have gotten to some semblance of a finished state). It was a really great challenge, fun and intense. I wish I could have put more of myself into it, but the usual anchors of responsibility to school and living held me back as usual. I&#8217;m going to keep exploring what I can do with this fun little platform of mine, there is a lot of potential hiding in its diminutive hardware.</p>
<p><a class="download" title="Tiny Miasmata source code" href="http://www.hackniac.com/blog/wp-content/uploads/2012/01/TinyMiasmata.zip" target="_blank">Source code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=974</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://www.hackniac.com/blog/wp-content/uploads/2012/02/song.wav" length="524332" type="audio/wav" />
<enclosure url="http://www.hackniac.com/blog/wp-content/uploads/2012/02/corruption.wav" length="229420" type="audio/wav" />
<enclosure url="http://www.hackniac.com/blog/wp-content/uploads/2012/02/death.wav" length="253996" type="audio/wav" />
		</item>
		<item>
		<title>Demomite</title>
		<link>http://www.hackniac.com/blog/?p=927</link>
		<comments>http://www.hackniac.com/blog/?p=927#comments</comments>
		<pubDate>Mon, 30 Jan 2012 23:00:48 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Demo]]></category>
		<category><![CDATA[Device]]></category>
		<category><![CDATA[Favorites]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[attiny]]></category>
		<category><![CDATA[attiny2313]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[bit]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[chip]]></category>
		<category><![CDATA[chiptune]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[cut]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[demoscene]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[dip]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[dremel]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hackniac]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[Integrated Circuit]]></category>
		<category><![CDATA[isp]]></category>
		<category><![CDATA[lcd]]></category>
		<category><![CDATA[machine]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[maker]]></category>
		<category><![CDATA[mcu]]></category>
		<category><![CDATA[micro]]></category>
		<category><![CDATA[microcomputer]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[nokia3310]]></category>
		<category><![CDATA[plastic]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[protoboard]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[pwm]]></category>
		<category><![CDATA[small]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[solder]]></category>
		<category><![CDATA[speaker]]></category>
		<category><![CDATA[timelapse]]></category>
		<category><![CDATA[tiny]]></category>
		<category><![CDATA[transistor]]></category>
		<category><![CDATA[veroboard]]></category>
		<category><![CDATA[wire]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=927</guid>
		<description><![CDATA[Now mid-way through my senior year of high school, it has been a while since I finished applying to colleges. In fact, it&#8217;s almost time to start receiving their possibly life-altering decisions. However, before that happens there is one last hurdle to cross: the mid-year report, a list of my current grades and midterm exam <a href='http://www.hackniac.com/blog/?p=927' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/01/demomite_lores_full.jpg"><img class="aligncenter size-full wp-image-948" title="demomite_lores_full" src="http://www.hackniac.com/blog/wp-content/uploads/2012/01/demomite_lores_full.jpg" alt="" width="695" height="550" /></a></p>
<p>Now mid-way through my senior year of high school, it has been a while since I finished applying to colleges. In fact, it&#8217;s almost time to start receiving their possibly life-altering decisions. However, before that happens there is one last hurdle to cross: the mid-year report, a list of my current grades and midterm exam results sent to the academic institutions I&#8217;ve applied to so that they can be assured that I really am the high-achieving student that I tried to present myself as in my application. Besides the obvious gift of stress, this report also presents an opportunity. Some schools allow &#8220;additional materials&#8221; to be submitted along with the report. This project is my additional material, designed to demonstrate the extent of my abilities &#8211; and more importantly, show that I am serious about taking advantage of my potential when I get to college.</p>
<h2>A Tiny (2313) Demo (Dyna)Mite</h2>
<p>I had planned to do a project to send with my mid-year report, but I didn&#8217;t know what form it would take. Last weekend I finally had the first chance to take a shot at actually creating something for it, because that weekend marked the end of midterms at my school, and with them the end of intense studying and stress. Unfortunately that Friday and Saturday my inspiration failed me. I piddled around with various experiments I&#8217;ve been working on hoping that one would spark a brilliant idea for a project, but none managed any success towards that goal. As a result, late Saturday night I was pretty fed-up with myself and frankly a little depressed.  &#8221;How dare my brain choose this time to quit creating&#8221;, I was thinking to myself. Fortunately my frustration led me to muse about attempting ideas I had previously thrown out for perceived lack of genius/complexity, and Demomite was born.</p>
<hr />
<h2> Ignore the snazzy portmanteau (it&#8217;s really quite simple)</h2>
<p>The idea for this project was incepted by my previous <a title="Tiny Asm-Copter" href="http://www.hackniac.com/blog/?p=268">TinyAsmCopter project</a>. Demomite is a tiny handheld game device designed to provide a platform for software demos. In the computing world a demo is a demonstration of programming/artistic/musical ability. It&#8217;s specs are severely limited on purpose to make programming for it more challenging<strong>:</strong></p>
<h3>Computing power:</h3>
<ul>
<li><strong>attiny2313 microcontroller</strong></li>
<li><strong>8 MHz CPU w/ ~8 MIPS</strong></li>
<li><strong>2 kilobytes of program memory</strong></li>
<li><strong>128 bytes of RAM</strong></li>
<li><strong>128 bytes of EEPROM</strong></li>
</ul>
<h3>Graphics:</h3>
<div>
<div>
<ul>
<li><strong>Nokia 3310 LCD</strong></li>
<li><strong>84&#215;48 pixels</strong></li>
<li><strong>black and white</strong></li>
<li><strong>serial interface (slow)</strong></li>
</ul>
<h3>Sound:</h3>
<div>
<ul>
<li><strong>built-in speaker</strong></li>
<li><strong>simple 1-transistor amplifier</strong></li>
<li><strong>PWM (1 bit) signal</strong></li>
</ul>
</div>
</div>
</div>
<h3>Controls:</h3>
<div>
<ul>
<li><strong>N.E.S. controller</strong></li>
<li><strong>shift interface w/ min. ~110 microsecond read time</strong></li>
<li><strong>8 buttons</strong></li>
</ul>
<h3>Misc:</h3>
<div>
<ul>
<li><strong>removable 400 mAh LiPo rechargeable battery</strong></li>
<li><strong>DC-DC boost converter (increased power efficiency) -</strong> LiPower from Sparkfun</li>
</ul>
<hr />
<h2>Building It</h2>
<p><center><iframe src="http://www.youtube.com/embed/cQv1nFnKGu0" frameborder="0" width="640" height="480"></iframe></center>I had the idea Saturday night, and finished building it Sunday night. I worked with parts that I already had on-hand, so the process was fairly straightforward. To start I prototyped the electronics on a breadboard, connecting the LCD then N.E.S. controller then amplifier/speaker. After writing a bit of assembly code to show that each of those parts worked properly I started putting it all into a handheld form.</p>
<p>I did not know what I would do for the case, so I just grabbed the box that I fill with junk pieces of plastic for this very purpose and dumped it on my desk. After half of an hour of holding together pieces of plastic and the electronics I finally settled on a design using the lids of two project boxes from RadioShack. It&#8217;s just the right size, but an odd design because there is an open slit around the edge. The detriments of not having a sealed enclosure were outweighed by the benefits of the size and look though, so I went ahead with it. I cut a squarish hole for the LCD, some small holes for the speaker, and everything fit nicely.</p>
<p>Transferring the circuit to breadboard went along with no hiccups, even though I did it by eye without ever writing down a design (don&#8217;t try that at home folks). A few tacks of hot glue secured the mainboard in place and reinforced the wired connections. Painters tape insulated the bare connections and held down the wires. I chose a switch that would fit perfectly into the slit around the edge and made a stand-off for it by ripping apart a CD drive front. The battery compartment is a bent piece of metal from an ancient camcorder, which is simply hot-glued to the top part of the case.</p>
<p>Connecting the N.E.S. controller to the main enclosure proved to be a challenge. I didn&#8217;t want to mess with the outside by placing a reinforcing strip of plastic or something else, and I didn&#8217;t want to just hot glue the two together because that would interfere with disassembly. In the end I just took more of the plastic strip that I used to offset the switch and attached it to the N.E.S. controller so that it can be slotted into the slit around the edge of the enclosure. It is slick because I can un-slot the controller and fold the thing in half to fit in my pocket, but when it is slotted it can easily separate again and there&#8217;s  a lot of wobble. It will be a temporary solution until I come up with something better.</p>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/01/demomite_guts_lores.jpg"><img class="aligncenter size-full wp-image-961" title="demomite_guts_lores" src="http://www.hackniac.com/blog/wp-content/uploads/2012/01/demomite_guts_lores.jpg" alt="" width="695" height="521" /></a></p>
<p>The Demomite is one of my favorites out of the things I&#8217;ve ever built. It was extremely satisfying to make and hopefully will serve its purpose of showing what I can do well. I will use it like a boxer training with weights, when I step out of its restrictive walls the punches I throw will be all the more powerful.</p>
<h2>Schematic</h2>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/01/schematic.jpg"><img class="aligncenter size-medium wp-image-1181" title="schematic" src="http://www.hackniac.com/blog/wp-content/uploads/2012/01/schematic-300x221.jpg" alt="" width="300" height="221" /></a></p>
<h2>Software</h2>
<ul>
<li><a class="download" title="Tiny Miasmata" href="http://www.hackniac.com/blog/?p=974">Tiny Miasmata</a></li>
</ul>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=927</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>What Do You Mean &#8216;Hacker&#8217;?</title>
		<link>http://www.hackniac.com/blog/?p=919</link>
		<comments>http://www.hackniac.com/blog/?p=919#comments</comments>
		<pubDate>Fri, 13 Jan 2012 02:08:16 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Exploration]]></category>
		<category><![CDATA[philosophy]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=919</guid>
		<description><![CDATA[According to popular opinion a hacker is an evil person. It seems like there is a new story every day about a hacker breaking through some corporation&#8217;s security and stealing the private information of millions of people. With every new crime there is a wave of fresh hate towards hackers and their ilk. With all <a href='http://www.hackniac.com/blog/?p=919' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<div><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/01/eye_open_small.jpg"><img class="alignleft size-full wp-image-1082" title="eye_open_small" src="http://www.hackniac.com/blog/wp-content/uploads/2012/01/eye_open_small.jpg" alt="" width="695" height="521" /></a></div>
<p>According to popular opinion a hacker is an evil person. It seems like there is a new story every day about a hacker breaking through some corporation&#8217;s security and stealing the private information of millions of people. With every new crime there is a wave of fresh hate towards hackers and their ilk. With all of the invective directed towards hackers one would think that they represent the super-villains of this millennium.<br />
&nbsp;<br />
And yet &#8216;hacker&#8217; is my favorite word for describing who I am. It is a good guess that I am not an evil information thief. So why do I choose &#8216;hacker&#8217; if I am asked to pick one word to use to describe myself? I choose it because everything that it represents, except for law-breaking, also represents me perfectly. The spirit of hacking is beautiful, and something that has survived its new popular association with the most modern of crimes. That spirit is what I believe describes why I do what I do most accurately.<br />
&nbsp;<br />
Hacking is about freeing things from their original purposes. A hacker works with what he has. A hacker&#8217;s raw material is not the substance of what is before him, it&#8217;s the invisible connections within it. With careful study the connections can be dissected and repurposed. That spirit of careful discovery and artfully applied skill is what is so beautiful about hacking, and what I most strongly identify with.<br />
&nbsp;<br />
I do not endeavor to break into the databases of corporations or the private files on people&#8217;s computers, but I am still passionately a hacker at heart. I strive to gaze deeply into the connections between the materials I have to work with, and by doing so get the material to exert the force that I want to apply, rather than applying the force wastefully myself. By using the system to my advantage I make the most of my efforts, and extend my creative reach further as a result. My ability to create is not as special as the hacker spirit that guides my application of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=919</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Super Watch Post-Mortem</title>
		<link>http://www.hackniac.com/blog/?p=903</link>
		<comments>http://www.hackniac.com/blog/?p=903#comments</comments>
		<pubDate>Thu, 12 Jan 2012 06:13:23 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Device]]></category>
		<category><![CDATA[Status]]></category>
		<category><![CDATA[ambition]]></category>
		<category><![CDATA[attempt]]></category>
		<category><![CDATA[failure]]></category>

		<guid isPermaLink="false">http://www.hackniac.com/blog/?p=903</guid>
		<description><![CDATA[I wanted to make myself a watch a few months ago, so I rifled through all the parts I had on hand and picked out my favorites. Then I spent a day enjoying the painstaking process of making this mess. It&#8217;s an infrared temperature sensor (left side above middle), infrared TV remote receiver (on top <a href='http://www.hackniac.com/blog/?p=903' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/01/watch_back.jpg"><img class="aligncenter size-large wp-image-912" title="watch_back" src="http://www.hackniac.com/blog/wp-content/uploads/2012/01/watch_back-1024x980.jpg" alt="" width="695" height="665" /></a></p>
<p>I wanted to make myself a watch a few months ago, so I rifled through all the parts I had on hand and picked out my favorites. Then I spent a day enjoying the painstaking process of making this mess.</p>
<p>It&#8217;s an infrared temperature sensor (left side above middle), infrared TV remote receiver (on top left), infrared LED (legged thing on right), and surface-mount Atmega168 attached to a Nokia 3310 B&#038;W graphical LCD. I also had an EEPROM chip and accelerometer picked out for it, as well as a lithium ion battery to power it all, but I never got far enough in the project to add them in. The wire hoops on the lower left were designed as a minimalistic programming interface.</p>
<p><a href="http://www.hackniac.com/blog/wp-content/uploads/2012/01/processor_connect2_lowres.jpg"><img src="http://www.hackniac.com/blog/wp-content/uploads/2012/01/processor_connect2_lowres.jpg" alt="" title="processor_connect2_lowres" width="695" height="521" class="alignleft size-full wp-image-1167" /></a><br />
As its biggest plus, it shows how finely I can solder. The magnet wire (just normal solid wire with thin coating) was soldered to the surface-mount Atmega168 by hand with no magnification. Maybe I am a decent surgeon in another life&#8230;</p>
<p>The wiring was only completed to the programming interface and the LCD. Once I was able to power it up and get code into it I saw that the LCD connection was flaky. It required pressure in a very particular spot and in a very particular direction for anything to show up on the screen. I tried using glue to secure it and fix that problem, but it only made everything worse. Eventually my frustration with the LCD killed the project.</p>
<p>It was an interesting attempt, but I think it was doomed from the start because I focused purely on the fun of it and held nothing back to spend on making a solid structure. I jumped right into building it without any kind of design stage beforehand, just a few sketches to get a sense of what pins were where. Many of my best projects have progressed like that (notably <a href="http://www.hackniac.com/blog/?p=974" title="Tiny Miasmata">Tiny Miasmata</a>), but it requires a very fine balance to pull of correctly. Fluidity is hugely useful in creative pursuits, because it links the mind more closely to the work, but it&#8217;s also dangerous in the engineering world. Complex systems are often not forgiving. But this is what I like to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackniac.com/blog/?feed=rss2&#038;p=903</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

