<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Technical ramblings, projects that I am working on and anything I find interesting.</description><title>Tom Gallacher's Blog</title><generator>Tumblr (3.0; @gxblast)</generator><link>http://blog.tomg.co/</link><item><title>How to install Node.js on your Raspberry Pi;</title><description>&lt;p&gt;Edit: for use with nodejs &amp;gt; 0.8 use this -&amp;gt; &lt;a href="https://github.com/gflarity/node_pi" target="_blank"&gt;https://github.com/gflarity/node_pi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: I am not a unix god, and pretty much hacked this together to get working (and it does for me), so a more concise method might appear, so I you do find one let me know, also if you break your PI it is not my fault =] .&lt;/p&gt;

&lt;p&gt;So you have just received your raspberry pi and are thinking about running nodejs on it, good. Lets get started.&lt;/p&gt;

&lt;p&gt;I am assuming that you have pre-installed the debian flavoured distribution, have enough space and are up and running. If your having problems pop over to the Raspberry Pi &lt;a href="http://www.raspberrypi.org/forum" target="_blank"&gt;Forums&lt;/a&gt; and they will be able to help you out!&lt;/p&gt;

&lt;p&gt;First we need to install the OpenSSL dev libraries for SSL support, you can skip this step by using the &lt;code&gt;--without-ssl&lt;/code&gt; flag when configuring.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo apt-get install libssl-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;First we need to download the latest stable release v0.6.15 (Having problems compiling the unstable branch at the moment 0.7.X).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ wget &lt;a href="http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz" target="_blank"&gt;&lt;a href="http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz" target="_blank"&gt;http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz&lt;/a&gt;&lt;/a&gt;
$ tar -xf node-v0.6.15.tar.gz
$ cd node-v0.6.15
$ export CCFLAGS='-march=armv6'
$ export CXXFLAGS='-march=armv6'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now to edit the following file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ vim deps/v8/SConstruct
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or you can use &lt;code&gt;nano&lt;/code&gt; if you prefer, first you need to adjust line &lt;code&gt;82 and 83&lt;/code&gt; to match the following&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; 'all': {
   'CCFLAGS':      ['$DIALECTFLAGS', '$WARNINGFLAGS', '-march=armv6'],
   'CXXFLAGS':     ['-fno-rtti', '-fno-exceptions', '-march=armv6'],
 },
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then you need to comment out lines &lt;code&gt;157-162&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: Make sure to remove the comma from the end of  &lt;code&gt;'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0']&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; 'armeabi:softfp' : {
   'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0']
  # 'vfp3:on': {
  #   'CPPDEFINES' : ['CAN_USE_VFP_INSTRUCTIONS']
  # },
  # 'simulator:none': {
  #   'CCFLAGS':     ['-mfloat-abi=softfp'],
  # }
 },


$ ./configure
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The next step will take a while to finish ~40mins&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ make
$ make install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You will now have a working &lt;code&gt;nodejs&lt;/code&gt; installation and also have access to &lt;code&gt;npm&lt;/code&gt; nodejs’ package manager. If you are using ARM Arch linux then you can download a maintained tarball from &lt;a href="http://archlinuxarm.org/arm/community/nodejs-0.6.15-1.1-arm.pkg.tar.xz" target="_blank"&gt;&lt;a href="http://archlinuxarm.org/arm/community/nodejs-0.6.15-1.1-arm.pkg.tar.xz" target="_blank"&gt;http://archlinuxarm.org/arm/community/nodejs-0.6.15-1.1-arm.pkg.tar.xz&lt;/a&gt;&lt;/a&gt; or as &lt;a href="https://twitter.com/#!/WarheadsSE/status/193362055628193792" target="_blank"&gt;@WarheadsSE&lt;/a&gt; pointed out use:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ pacman -S nodejs
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I am in the process of making some benchmarks to see how much this $35 computer can handle, I did get my personal website running last night &lt;a href="http://pi.tomg.co" target="_blank"&gt;pi.tomg.co&lt;/a&gt; and seemed to handle the traffic quite well. Such an amazing piece of kit!&lt;/p&gt;

&lt;p&gt;If you make anything awesome then let me know on twitter &lt;a href="http://twitter.com/tomgco" target="_blank"&gt;@tomgco&lt;/a&gt; or email me me[at]tomg.co!&lt;/p&gt;

&lt;p&gt;Here are some more semi-colons! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/p&gt;</description><link>http://blog.tomg.co/post/21322413373</link><guid>http://blog.tomg.co/post/21322413373</guid><pubDate>Sun, 15 Jul 2012 11:02:17 +0100</pubDate><category>Raspberry Pi</category><category>hack</category><category>Node.js</category></item><item><title>Alpha benchmarks for dis.io.</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_m39f6brrwu1qaylngo2_500.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_m39f6brrwu1qaylngo1_500.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_m39f6brrwu1qaylngo4_500.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_m39f6brrwu1qaylngo3_500.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;p&gt;Alpha benchmarks for dis.io.&lt;/p&gt;</description><link>http://blog.tomg.co/post/22075871618</link><guid>http://blog.tomg.co/post/22075871618</guid><pubDate>Sun, 29 Apr 2012 22:20:39 +0100</pubDate><category>dissertation</category><category>dis.io</category></item><item><title>Here is a benchmark of Dis.io - my browser based distributed...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_m38l09xrNg1qaylngo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Here is a benchmark of Dis.io - my browser based distributed computing platform running with 4-8 clients.&lt;/p&gt;

&lt;p&gt;Edit: May have made a mistake - but the comparison on completion time is accurate.&lt;/p&gt;</description><link>http://blog.tomg.co/post/22040733483</link><guid>http://blog.tomg.co/post/22040733483</guid><pubDate>Sun, 29 Apr 2012 11:26:00 +0100</pubDate></item><item><title>Last week of dissertation.</title><description>&lt;p&gt;Wow, so where do I start…&lt;/p&gt;

&lt;p&gt;The end is so close now, exams have been completed, final year project has been successfully designed and implemented - may I add it runs a treat, benchmarks coming up soon and maybe even a live version! All I have to do now is finish the writeup and graduate.&lt;/p&gt;

&lt;p&gt;Scary stuff.&lt;/p&gt;

&lt;p&gt;So what projects will I be working on next?&lt;/p&gt;

&lt;p&gt;I have some epic ideas for some projects which I am going to implementing, and I will be on this like a rabbit in spring (I did google this to be technically correct, its February to October :] ). But the lot of you that a curious here are some ideas I have lined up: Littenote, Key-bind library (A really decent one for those ctrl+s&amp;#8217;), discussions for twitter, iTunes search by album colour and of course dis.io!&lt;/p&gt;

&lt;p&gt;And some epic Raspberry Pi stuff, so watch this space and the &lt;a href="http://www.linuxuser.co.uk/" target="_blank"&gt;Linux User &amp;amp; Developer Magazine&lt;/a&gt; - I will be writing some awesome tutorials! ;]&lt;/p&gt;</description><link>http://blog.tomg.co/post/21995893873</link><guid>http://blog.tomg.co/post/21995893873</guid><pubDate>Sat, 28 Apr 2012 20:31:01 +0100</pubDate><category>University</category><category>Graduation</category></item><item><title>Dissertation Update: dis.io</title><description>&lt;p&gt;So, I have been keeping some sort of personal journal where I have been jotting down all my ideas, research and prototypes for my Dissertation because of this I haven&amp;#8217;t really felt that it was possible or that I was able to document what I was doing without examples and giving too much away =], however I digress as I have now got to the stage where I have lots of different things to say. This blog will now be part of a weekly summary on current progress and generally interesting problems I have encountered.&lt;/p&gt;

&lt;h3&gt;Software Development Methodology&lt;/h3&gt;

&lt;p&gt;For the whole process of conceptualising, designing, building and testing my project I have decided to follow the V-Model. Now I have many reasons why I have chosen this over a more agile route such as scrum, however the main reason is that V-model is much easier to adhere to with a team of one, than choosing a model which requires a team to work well. Not to mention that the marks from using the V-model are much easier to nail down. [1-∞]
If you are not familier with this then checkout wikipedia, or the image below:&lt;/p&gt;

&lt;h4&gt;Fig 1.&lt;/h4&gt;

&lt;p&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/e/e8/Systems_Engineering_Process_II.svg" alt="V-Model"/&gt;&lt;/p&gt;

&lt;p&gt;FYI, I am skipping my requirements here.&lt;/p&gt;

&lt;h3&gt;Introduction to dis.io&lt;/h3&gt;

&lt;p&gt;So the main goal of my application, system, SaaS or whatever you want to call it is to be able to calculate computational complex tasks and distribute the processing of these tasks to clients.
Where this differs from a traditional distributed computing platform such as (Folding@Home, BONIC) is the machines doing the leg work (Workers) are being utilised via the web browser using the WebWorkers API. The other main aspect of dis.io is the ad-hoc nature of each component of the system allowing it to be scaled by just spawning new processes. This means that dis.io should not have a single point of failure (lynchpin).&lt;/p&gt;

&lt;h3&gt;Components&lt;/h3&gt;

&lt;p&gt;Here is a breakdown of components:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Dashboard&lt;/strong&gt; - Web interface for creating new tasks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manager&lt;/strong&gt; - Manages the Distributors for a task and sends a WorkUnit&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Distributor&lt;/strong&gt; - Distributes these WorkUnits to clients (Change of name likely)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Client&lt;/strong&gt; - Runs the WorkUnits&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I will start with how I find it easiest to explain, starting from the client facing code and work my way through the system design as it currently stands. (which possibly will not be that long!)&lt;/p&gt;

&lt;p&gt;Clients will be be giving a WorkUnit when visiting a dis.io enabled website. The WorkUnit will contain a UserID, a distributor location, the actual code to run, the data to run against it and a deadline for a result to be produced. It will then be ran every time the user visits an enabled site.&lt;/p&gt;

&lt;p&gt;Distributors facilitate the clients with it&amp;#8217;s associated WorkUnit and then queues the received results back to it&amp;#8217;s manager. It is possible to have multiple distributors with the same WorkUnits, this will scale depending on the load and how many connections etc.&lt;/p&gt;

&lt;p&gt;Manager&amp;#8217;s will be the intelligence for the distributors, providing stats on what is queued, how many iterations of the WorkUnits should be carried out, amalgamating the results and verifying the integrity.&lt;/p&gt;

&lt;p&gt;The dashboard will allow the user to upload the tasks and modify due dates and presents the data and the results back to the user.&lt;/p&gt;

&lt;h3&gt;Status&lt;/h3&gt;

&lt;p&gt;Well now you know roughly what my project, I have left out some fundamentals as I will be writing for hours. Currently I am starting to build some components which I have nailed down the design for and that I know will not change (apart from possibly minor things).&lt;/p&gt;

&lt;p&gt;I have also built some WorkUnits, and the framework to run these, either in the browser / experimental support for a node cli version.&lt;/p&gt;

&lt;p&gt;The work-units include:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Generating the nth digit of PI using BBP (Bailey-Borwein-Plouffe) method&lt;/li&gt;
&lt;li&gt;a Smoke test&lt;/li&gt;
&lt;li&gt;a potential performance indicator&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Thanks for reading, have any questions send them to me on twitter (&lt;a href="http://twitter.com/tomgco" target="_blank"&gt;@tomgco&lt;/a&gt;), the next version should be out in a week hopefully =]&lt;/p&gt;</description><link>http://blog.tomg.co/post/18392029693</link><guid>http://blog.tomg.co/post/18392029693</guid><pubDate>Mon, 27 Feb 2012 20:29:38 +0000</pubDate><category>Dissertation</category><category>Final Year Project</category><category>dis.io</category></item><item><title>I am going Dvorak.</title><description>&lt;p&gt;For this week I am going to change my keyboard layout from QWERTY to DVORAK.&lt;/p&gt;

&lt;p&gt;DVORAK is an alternative keyboard layout patented in 1936 by Dr. August Dvorak. This was conceptualised to provide a keyboard which improves typing speeds. It manages this because Qwerty was invented to prevent type writers jamming.&lt;/p&gt;

&lt;h3&gt;Why?&lt;/h3&gt;

&lt;p&gt;Because I can. I think having useless skills is pretty cool, also it will force me to pay more attention to my typing :P&lt;/p&gt;</description><link>http://blog.tomg.co/post/15672691422</link><guid>http://blog.tomg.co/post/15672691422</guid><pubDate>Wed, 11 Jan 2012 15:47:55 +0000</pubDate><category>DVORAK</category><category>Keyboard Layouts</category></item><item><title>DMG Assignment: Porsche 944 Turbo in 3ds Max (3 of 3)

My final...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lxg3gnWkTm1qaylngo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;DMG Assignment: Porsche 944 Turbo in 3ds Max (3 of 3)&lt;/p&gt;

&lt;p&gt;My final model all set and lovely.&lt;/p&gt;</description><link>http://blog.tomg.co/post/15466533960</link><guid>http://blog.tomg.co/post/15466533960</guid><pubDate>Sat, 07 Jan 2012 20:26:00 +0000</pubDate><category>3DS Max</category><category>Render</category><category>Porsche 944 Turbo</category></item><item><title>DMG Assignment: Apartment in 3ds Max (2 of 3)

This is my second...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lxg3amMOVS1qaylngo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;DMG Assignment: Apartment in 3ds Max (2 of 3)&lt;/p&gt;

&lt;p&gt;This is my second model. boom.&lt;/p&gt;</description><link>http://blog.tomg.co/post/15466352131</link><guid>http://blog.tomg.co/post/15466352131</guid><pubDate>Sat, 07 Jan 2012 20:23:10 +0000</pubDate><category>3DS Max</category><category>Render</category><category>Apartment</category></item><item><title>DMG Assignment:  Speedy Gonzales in 3ds Max (1 of 3)

Annoyed...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lxesh7bA7J1qaylngo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;DMG Assignment:  Speedy Gonzales in 3ds Max (1 of 3)&lt;/p&gt;

&lt;p&gt;Annoyed that I am stuck doing this.&lt;/p&gt;

&lt;p&gt;This is what I have been working for ages.&lt;/p&gt;</description><link>http://blog.tomg.co/post/15432403165</link><guid>http://blog.tomg.co/post/15432403165</guid><pubDate>Sat, 07 Jan 2012 03:31:00 +0000</pubDate><category>3DS Max</category><category>Render</category><category>Speedy Gonzales</category></item><item><title>Something I have been working on</title><description>&lt;p&gt;I just thought I should share something with you, my latest project:&lt;/p&gt;

&lt;h3&gt;&lt;a href="http://littlenoteapp.com" target="_blank"&gt;Little Note&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Currently in a closed beta &lt;a href="mailto:beta-test@littlenoteapp.com" target="_blank"&gt;email to get in&lt;/a&gt;, Little Note is a lightweight note application.&lt;/p&gt;

&lt;p&gt;What sets this aside from other note apps is that notes are stored on your dropbox account, cutting our sever costs right the way down. All we do is host the API and client-side code.&lt;/p&gt;

&lt;p&gt;So yeah check it out, and if you do sign up for the beta mention that you read it on my blog and you will get awesome geek cred - including the ability to talk to me over email! How 1999!&lt;/p&gt;</description><link>http://blog.tomg.co/post/14980665408</link><guid>http://blog.tomg.co/post/14980665408</guid><pubDate>Thu, 29 Dec 2011 17:31:42 +0000</pubDate><category>NodeJS</category><category>Dropbox</category><category>WebApp</category></item><item><title>My Dissertation and Project</title><description>&lt;p&gt;&lt;em&gt;&amp;#8220;A browser based distributed computing platform utilising idle cpu cycles on visitors computers when browsing certain websites&amp;#8221;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Pretty happy with how that sounds.&lt;/p&gt;

&lt;p&gt;Will be utilising NodeJS for the distribution server and JavaScript Web Workers to compute work units in the browser with the possibility to expand and create native plugins for the browsers.&lt;/p&gt;

&lt;p&gt;Going to be a pretty brutal but fun build =P&lt;/p&gt;</description><link>http://blog.tomg.co/post/13552856062</link><guid>http://blog.tomg.co/post/13552856062</guid><pubDate>Wed, 30 Nov 2011 18:50:26 +0000</pubDate><category>Final Year Project</category><category>Dissertation</category><category>Computing</category><category>CS</category></item><item><title>Here is something I knocked up last night, so enjoy!

Size is...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lv0xn0OiyV1qaylngo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Here is something I knocked up last night, so enjoy!&lt;/p&gt;

&lt;p&gt;Size is 1920 x 1080, if you want any other sizes let me know!&lt;/p&gt;

&lt;p&gt;If you haven’t heard of the &lt;a href="http://www.raspberrypi.org/" target="_blank"&gt;Raspberry Pi&lt;/a&gt; then check it out!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="http://cl.ly/0D0b2a2n0R1F0e3X2Q00" target="_blank"&gt;Download&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</description><link>http://blog.tomg.co/post/13118362201</link><guid>http://blog.tomg.co/post/13118362201</guid><pubDate>Sun, 20 Nov 2011 18:49:00 +0000</pubDate><category>Raspberry Pi</category><category>Wallpaper</category></item><item><title>Well my housemate (@kieranajp) wanted to be able to control two...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lv0xim4i8t1qaylngo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Well my housemate (&lt;a href="http://www.kieranajp.co.uk" target="_blank"&gt;@kieranajp&lt;/a&gt;) wanted to be able to control two multiple inputs from different audio sources to one pair of speakers. Usually I would tell him to use a software solution however his other machine is a massive gamimg beast. Power consumption == £££ || $$$.&lt;/p&gt;

&lt;p&gt;So basically we purchased the components soldered it together and chucked it in a box:&lt;/p&gt;

&lt;p&gt;1 x Tripad Board&lt;/p&gt;

&lt;p&gt;1 x DPDT switch&lt;/p&gt;

&lt;p&gt;3 x 3.5mm sockets&lt;/p&gt;

&lt;p&gt;1 x Ice Bluebox&lt;/p&gt;

&lt;p&gt;As you can see from the final result… sexy!&lt;/p&gt;</description><link>http://blog.tomg.co/post/13118275528</link><guid>http://blog.tomg.co/post/13118275528</guid><pubDate>Tue, 15 Nov 2011 00:00:00 +0000</pubDate><category>Hack</category><category>Spare-Time</category></item><item><title>Where have I gone?</title><description>&lt;p&gt;Well I blame posterous for changing their backend and confusing me; however the real culprit is starting my final year at university&amp;#8230;&lt;/p&gt;

&lt;p&gt;I have been working on very small things such as a USB powered ghost, pumpkin carving and some software updates on the SYMA helicopter which will all be revealed at some point in the future. With the release of Battlefield 3 myself and my house mates have been engrossed in multiplayer.&lt;/p&gt;

&lt;h3&gt;Gzippo&lt;/h3&gt;

&lt;p&gt;I do have some sad news though - well good for you, bad for me news! With the release of Node.js 0.6 a new ZLib API has been introduced and as I thought gzipping will be added to the latest version of Connect and ExpressJS; This means that gzippo is reaching end of life&amp;#8230; however I will still be maintaining gzippo and depending how good @tjholowaychuk&amp;#8217;s implementation possibly new features, including the native node.js API.&lt;/p&gt;

&lt;h3&gt;New App in the making! (Hot off the press)&lt;/h3&gt;

&lt;p&gt;Myself and Chris Garbe (&lt;a href="http://www.twitter.com/@5utekh" target="_blank"&gt;@5utekh&lt;/a&gt;) have also started thinking about a new and exiting app which we will be working on in our own time; it&amp;#8217;s an exiting and simple product which we think will smash the market ;]&lt;/p&gt;

&lt;p&gt;I will let more informational out at a later date!&lt;/p&gt;</description><link>http://blog.tomg.co/post/13118122932</link><guid>http://blog.tomg.co/post/13118122932</guid><pubDate>Thu, 10 Nov 2011 00:00:00 +0000</pubDate></item><item><title>Syma 107 Arduino Helicopter - Part two</title><description>&lt;h3&gt;Just a Quick One&lt;/h3&gt;

&lt;p&gt;Yesterday I received a a package, inside was my brand new Syma 107 IR Controlled Helicopter in red, before I even flew it myself I had to try and get my Arduino to raise and lower it. I open up my code into the Arduino IDE and uploaded, as normal it didn&amp;#8217;t work first time, I ended up tinkering with the timings etc, until I got them right and the propellers spun up! It was game time.&lt;/p&gt;

&lt;p&gt;The source for the proof of concept is available on Github, please feel free to fork, watch the project or even better follow me!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Hard Stuff&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As I have now got the device communicating with the Arduino the next step is to create a program which controls the helicopter, to begin with this will just emulate the controller which comes with the helicopter, I will be creating a framework so that you can have easy access to the Arduino.&lt;/p&gt;

&lt;p&gt;I originally intended to write the whole package in Java (Cross Platform), however after pondering the pro&amp;#8217;s and con&amp;#8217;s I decided to write it in Objective-C (Mac OS X) only because I though I would benefit from learning more Objective-C - possibly something I will regret at a later date. Don&amp;#8217;t fret though, I have got someone lined up to create a C# version for windows. Now if you are a linux user, which as you can tell from my site I do adore then you will be disappointed at the moment.&lt;/p&gt;

&lt;p&gt;Both the ArduinoCopterS107 and the Arduino version are released under the MIT License, however I would like to know if you are going to use it (for self satisfaction =]).
My next post will be a demonstration of the helicopter flying around whilst being controlled by my mac, in the mean time here is a little &lt;a href="http://www.youtube.com/watch?v=fdReN7iW5-U" target="_blank"&gt;video&lt;/a&gt; to show you the helicopter rising out of shot and then crashing on my bed whilst being controlled by the arduino.&lt;/p&gt;

&lt;h3&gt;The Software&lt;/h3&gt;

&lt;p&gt; 
- &lt;a href="https://github.com/tomgallacher/Arduino_Helicopter" target="_blank"&gt;Arduino Code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; 
- &lt;a href="https://github.com/tomgallacher/ArduinoCopterS107" target="_blank"&gt;Arduino Controller for Mac OS X&lt;/a&gt;&lt;/p&gt;</description><link>http://blog.tomg.co/post/13118145432</link><guid>http://blog.tomg.co/post/13118145432</guid><pubDate>Fri, 26 Aug 2011 00:00:00 +0100</pubDate><category>Arduino</category><category>Github</category><category>Objective-C</category><category>Programming</category></item><item><title>Syma 107 Arduino Helicopter - Part one</title><description>&lt;p&gt;Here it goes my first real venture into the fabulous world of Arduino&amp;#8217;s, Hardware and possibly intense 1&amp;#8217;s and 0&amp;#8217;s; I have made various small projects using my Arduino Uno, none of them worth documenting, this one is an exception.&lt;/p&gt;

&lt;p&gt;I will be interfacing with the Syma 107 IR LED controlled &lt;a href="http://www.amazon.co.uk/Syma-Gyroscope-Stabilizing-Controlled-Helicopter/dp/B00382N2SO/ref=pd_sim_k_h_b_cs_4/" target="_blank"&gt;helicopter&lt;/a&gt;. I ordered mine on Monday 23rd August 2011 however I thought I could start working on the software and getting the protocol nailed down before it arrives, so most likely what you are reading here is not even relevant, but lets assume it is, and I have got it right first time. =]&lt;/p&gt;

&lt;h3&gt;Research&lt;/h3&gt;

&lt;p&gt;After researching the IR Protocol for the Syma 107, I came across this &lt;a href="http://www.rcgroups.com/forums/showthread.php?t=1417249&amp;amp;page=3" target="_blank"&gt;thread&lt;/a&gt;. I found some sample code which will move the helicopter up and down by gently increasing the throttle and back down again. The thing I need to do is research the IR protocol between the transmitter (Tx from now on) and the helicopter (Rx) - thankfully this had already done for me and this is what I found; The Tx sends a continuous stream of bits, 77 cycles of the LED (~2000us) for the header then 12 cycles (~300us) to mark the start of a command and then 4 bytes for commanding the Yaw, Pitch, Channel, Throttle and Trim (Fig 1.) This is then followed by another 12 cycles. (~2000) to end the command.&lt;/p&gt;

&lt;h4&gt;Binary Alert&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;Fig 1.                ↓
0YYYYYYY   0PPPPPPP   CTTTTTTT   0AAAAAAA
Yaw        Pitch      Throttle   Trim (Adjustment)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;C - denoted by the arrow, is the channel that the helicopter is on. Yaw / Pitch have the same mapping where 0 is left / backward and 127 is right / forward, as the channel&amp;#8217;s 8th bit on the throttle is the channel the bit range that we get for channel one is 0-&amp;gt;127 and for channel two 128-&amp;gt;254.&lt;/p&gt;

&lt;p&gt;As you may know I am using a Arduino Uno this has a Atmega 328P-PU with a clock speed of 16Mhz which will be needed otherwise the timings will be wrong. The circuit I have hacked up is a simple serial connection of the infrared led which I de-soldered from a Samsung TV remote, linked up to PIN 8 and with a 320ohm resistor to ground. 
Hold Tight for even more Helicopter love when the beast is delivered!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update 1.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have now put my code on &lt;a href="https://github.com/tomgallacher/Arduino_Helicopter" target="_blank"&gt;github&lt;/a&gt;, so check it out if you are that way inclined, please note that this is pre-alpha (I mean pre-pre-alpha) this code will possibly not work.&lt;/p&gt;</description><link>http://blog.tomg.co/post/13117704855</link><guid>http://blog.tomg.co/post/13117704855</guid><pubDate>Sun, 21 Aug 2011 00:00:00 +0100</pubDate><category>Arduino</category><category>Helicopter</category><category>Syma107</category></item></channel></rss>
