<?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>Ricardo Dias</title>
	<atom:link href="http://ricardo-dias.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ricardo-dias.com</link>
	<description>My technological thoughts</description>
	<lastBuildDate>Tue, 01 May 2012 10:17:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>RoboCup DutchOpen 2012 &#8211; Eindhoven, Holland</title>
		<link>http://ricardo-dias.com/2012/05/01/robocup-dutchopen-2012-eindhoven-holland/</link>
		<comments>http://ricardo-dias.com/2012/05/01/robocup-dutchopen-2012-eindhoven-holland/#comments</comments>
		<pubDate>Tue, 01 May 2012 10:17:41 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=456</guid>
		<description><![CDATA[Hello everyone&#8230; Last week I&#8217;ve went to Eindhoven with the rest of the CAMBADA team to RoboCup DutchOpen 2012, to participate in the Middle Size League. Through the week we made several improvements and have been able to achieve the &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/05/01/robocup-dutchopen-2012-eindhoven-holland/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Hello everyone&#8230;</p>
<p>Last week I&#8217;ve went to Eindhoven with the rest of the CAMBADA team to RoboCup DutchOpen 2012, to participate in the Middle Size League.</p>
<p>Through the week we made several improvements and have been able to achieve the 3rd place, after competing with other physically stronger robots from Germany, Japan, Holland and Iran. I had a really good time in Eindhoven, especially because the organization was fabulous. Can&#8217;t find a single thing to complain about.</p>
<p>Now we are in preparations to RoboCup 2012 (Mexico).</p>
<p>If you want to know more about the CAMBADA team, <a href="http://www.ieeta.pt/atri/cambada/">this is our website</a>.<br />
Also, there is a website about the robotic projects currently made in University of Aveiro <a href="http://robotica.ua.pt/">here</a>.<br />
More info on the DutchOpen can be found <a href="http://www.robocupdutchopen.org/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/05/01/robocup-dutchopen-2012-eindhoven-holland/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OSX for Hackers</title>
		<link>http://ricardo-dias.com/2012/03/31/mac-osx-for-hackers/</link>
		<comments>http://ricardo-dias.com/2012/03/31/mac-osx-for-hackers/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 14:22:57 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=447</guid>
		<description><![CDATA[Today I found an interesting script on GitHub, written by Davide D&#8217;Agostino, which allows you to fine-tune some hidden preferences on OSX. Davide called it &#8220;OSX For Hackers&#8221;. The modifications range from simple visual effects disable to more complicated keyboard configurations. &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/03/31/mac-osx-for-hackers/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Today I found an interesting script on GitHub, written by <a href="http://www.daddye.it/">Davide D&#8217;Agostino</a>, which allows you to fine-tune some hidden preferences on OSX. Davide called it &#8220;OSX For Hackers&#8221;. The modifications range from simple visual effects disable to more complicated keyboard configurations.</p>
<p>Visit <a href="https://gist.github.com/2108403">https://gist.github.com/2108403</a> for the up-to-date version of the script.</p>
<p>Before using it, I suggest you check every single command to make sure you won&#8217;t disable or mess some functionality that you are used to.</p>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/03/31/mac-osx-for-hackers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SM130 RFID Reader and Arduino</title>
		<link>http://ricardo-dias.com/2012/03/17/sm130-rfid-reader-and-arduino/</link>
		<comments>http://ricardo-dias.com/2012/03/17/sm130-rfid-reader-and-arduino/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 16:56:39 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Do It Yourself]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[rfid]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=436</guid>
		<description><![CDATA[Recently I&#8217;ve been working on a RFID identification solution for a new project at University of Aveiro. Our first approach will be through Arduino and the Son Micro SM130 RFID module. At first, the Arduino seemed quite simple and effective &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/03/17/sm130-rfid-reader-and-arduino/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="Arduino and SM130" src="http://www.mcqn.net/mcfilter/images/UpgradingFirmwareOnSM130.jpg" alt="" width="768" height="576" /></p>
<p>Recently I&#8217;ve been working on a RFID identification solution for a new project at University of Aveiro.</p>
<p>Our first approach will be through Arduino and the Son Micro SM130 RFID module. At first, the Arduino seemed quite simple and effective for the final goal, but soon the problems came up.</p>
<p>We will have to communicate basically with two different modules:</p>
<ul>
<li>The <strong>RFID reader</strong> (ships with UART communication, but can be upgraded to an I2C firmware version)</li>
<li>The <strong>Door module</strong> (responsible to communicate with a database and opening the door &#8211; UART only communication)</li>
</ul>
<p>The first problem we came across is that Arduino only has one Hardware UART available, which is also connected to the USB interface (used to upload programs to the board). If we need to upload a new program to the ATMega, we have to physically disconnect the SM130 from the UART pins. Not only this is a non-elegant solution but also, if we need to print something to the Serial console, the same will be sent to the RFID module. For the Door communication we would use the SoftwareSerial library, as a second UART.</p>
<p>SoftwareSerial supports multiple software UARTs but only one of them can be &#8220;listening&#8221; at a time, which means we lose everything that is sent to us while we are not listening.</p>
<p>Our solution will be to upgrade the SM130 to the I2C version, leaving the HW UART free for debugging purposes and the Door module handling for the SoftwareSerial. This scheme improves the overall performance of our final prototype, because incoming messages will always be placed in the corresponding buffer, ready to be read as soon as we can.</p>
<p>In this post I will also provide you some useful information that I found throughout the preliminary search. All links were working at 17/march/2012, but if you find a broken link, feel free to contact me. Also, the information I provide is merely to instructional purposes, use it at your own risk.</p>
<h2>The I2C Firmware</h2>
<p>The I2C firmware version is not freely available in SonMicro&#8217;s website, but if you are interested in the official release of the I2C firmware, you should send an e-mail to support@sonmicro.com to request it.</p>
<p>The upgrade is easy and is done using the <a href="http://www.sonmicro.com/en/downloads/Mifare/SM130_FU.zip">Firmware Upgrade tool</a> available at SM130&#8242;s Support Webpage.</p>
<p>I found some links supposedly with the i2c firmware (use at your own risk, I recommend that you request it from SonMicro):</p>
<ul>
<li>I2C firmware: <a href="http://www.joostaanen.com/RFID/SM130/Firmware/i2c_28_b1.rme">http://www.joostaanen.com/RFID/SM130/Firmware/i2c_28_b1.rme</a></li>
<li>UART firmware: <a href="http://www.joostaanen.com/RFID/SM130/Firmware/um13d1.rme">http://www.joostaanen.com/RFID/SM130/Firmware/um13d1.rme</a></li>
<li>UART firmware that supports anti-collision (for multiple tag reading): <a href="http://www.joostaanen.com/RFID/SM130/Firmware/um13g.rme">http://www.joostaanen.com/RFID/SM130/Firmware/um13g.rme</a></li>
</ul>
<p>Connect the SM130 module to USB through a FTDI cable or an Arduino without the ATMega in the socket. You only need to connect 5 pins on SM130: +5V/Vcc (pins 1 and 28), GND (14), RX (11) and TX (12). If you are using a chipless Arduino, see <a href="http://www.mcqn.net/mcfilter/archives/computers/upgrading_the_firmware_on_the_sm130_rfid_module.html">this link</a> for more information.</p>
<p>Run the Firmware Upgrade tool, select the right COM port and the right firmware file you want to upload and then click &#8220;Auto Upgrade&#8221; button.</p>
<p>It is usual that the I2C slave address is not correctly set (it tends to be 0&#215;30 after the FW upgrade). To check/change it, you must use the <a href="http://www.sonmicro.com/en/downloads/Mifare/smrfid_mifare_v1_2_1.zip">SMRFID Mifare Tool</a> from SonMicro (available at the module&#8217;s support page). Unzip and execute the tool.</p>
<ul>
<li>Set the baud rate in the left top corner to 19200</li>
<li>Make sure you have the right COM port selected</li>
<li>Click &#8220;hardware commands&#8221; in the menu</li>
<li>Click ‘read I2C adress’</li>
</ul>
<p>If this returns 42 (or 0&#215;42) it has the default address. To change it to 0&#215;42 you click &#8220;Set I2C adress&#8221; in &#8220;hardware commands&#8221; menu and input 42 (input is done in HEX).</p>
<h2>Testing the module</h2>
<p>To test the module you can read the I2C Appplication Note from SonMicro and write your own program. However, to save time, there is already a library that you can use to print the card TAG in the serial monitor, called RFIDuino, <a href="https://github.com/marcboon/RFIDuino/zipball/master">available here</a>. Install the library and use the &#8220;seek&#8221; example. Hopefully you will see your TAG on the screen.</p>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/03/17/sm130-rfid-reader-and-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quadcopters play James Bond theme</title>
		<link>http://ricardo-dias.com/2012/03/05/Quadcopters+play+James+Bond+theme/</link>
		<comments>http://ricardo-dias.com/2012/03/05/Quadcopters+play+James+Bond+theme/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 11:02:59 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=423</guid>
		<description><![CDATA[Here is something that any robotics hobbyist like to see. Enjoy this quadcopter band performing the James Bond theme. The video was first seen at this year&#8217;s (2012) TED conference, with intent to show the robotics work in University of Pennsylvania &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/03/05/Quadcopters+play+James+Bond+theme/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><iframe src="http://www.youtube.com/embed/_sUeGC-8dyk" frameborder="0" width="560" height="315"></iframe></p>
<p>Here is something that any robotics hobbyist like to see. Enjoy this quadcopter band performing the James Bond theme.</p>
<p>The video was first seen at this year&#8217;s (2012) TED conference, with intent to show the robotics work in University of Pennsylvania GRASP Lab. They managed to get a set of autonomous quadcopters to perform this song with keyboard, drums, cymbals, guitar, and maracas.</p>
<p>Thanks Cátia for the suggestion.</p>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/03/05/Quadcopters+play+James+Bond+theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gameboy Color emulator running on a browser</title>
		<link>http://ricardo-dias.com/2012/01/12/gameboy-color-emulator-running-on-a-browser/</link>
		<comments>http://ricardo-dias.com/2012/01/12/gameboy-color-emulator-running-on-a-browser/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 09:27:02 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=347</guid>
		<description><![CDATA[Yesterday I posted about Cut The Rope being ported to HTML5+Javascript. Today, I continue the same topic, but with a different view. I&#8217;ve came across this fantastic site that puts a whole Gameboy Color Game Center in the browser, using &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/01/12/gameboy-color-emulator-running-on-a-browser/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I posted about Cut The Rope being ported to HTML5+Javascript. Today, I continue the same topic, but with a different view. I&#8217;ve came across this fantastic site that puts a whole <strong>Gameboy Color Game Center</strong> in the browser, using the power of Javascript and HTML5, created by <a title="opens in new window" href="http://www.grantgalitz.org/" target="_blank">Grant Galitz</a>. Now we are starting to get the dimension this change will have. You can see it in action <a href="http://www.grantgalitz.org/gamecenter/index.html">here</a>. He also has his open-source <strong>GameBoy Online Project</strong>, which source can be downloaded for free <a title="opens in new window" href="https://github.com/grantgalitz/GameBoy-Online" target="_blank">from GitHub</a>.</p>
<p>From my perspective, with everything we have seen until now, Adobe&#8217;s Flash is slowly going to be abandoned if Flash fails to bring anything new. There&#8217;s lots of examples of applications and effects that have been achieved using Flash in the past, but today we can build these using just web technologies. This ranges from the simple image galleries to word processors.</p>
<p>There is a also a blog about games being developed with HTML5 here: <a href="http://www.html5gamedevs.com/">http://www.html5gamedevs.com/</a></p>
<p>What do you think about this HTML5 revolution?</p>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/01/12/gameboy-color-emulator-running-on-a-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cut The Rope in HTML 5</title>
		<link>http://ricardo-dias.com/2012/01/11/cut-the-rope-in-html-5/</link>
		<comments>http://ricardo-dias.com/2012/01/11/cut-the-rope-in-html-5/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 09:37:26 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[cut the rope]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game port]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=332</guid>
		<description><![CDATA[In order to show developers the power of HTML 5, the astonishing successful mobile game Cut The Rope has been partially ported from Objective-C to Javascript and can be played for free in http://www.cuttherope.ie/, sponsored by Microsoft&#8217;s Internet Explorer, with some &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/01/11/cut-the-rope-in-html-5/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>In order to show developers the power of HTML 5, the astonishing successful mobile game <strong>Cut The Rope</strong> has been partially ported from Objective-C to Javascript and can be played for free in <a href="http://www.cuttherope.ie/">http://www.cuttherope.ie/</a>, sponsored by Microsoft&#8217;s Internet Explorer, with some unique levels in this version, like the one below.</p>
<p style="text-align: center;"><a href="http://www.cuttherope.ie/dev/notes-ielevels.jpg"><img class="aligncenter" src="http://www.cuttherope.ie/dev/notes-ielevels.jpg" alt="" width="600" height="338" /></a></p>
<p>In the up-right corner of the website, you will find a link to <strong>Behind the Scenes</strong> developer section, where I found some interesting notes:</p>
<blockquote><p>We think that the HTML5 version makes the web more fun and it demonstrates the advances in standards support made in the latest version of Internet Explorer. With that in mind, we want to share some of the cool “behind the scenes” technical details used on this project to help you build your own HTML5 sites and ultimately get ready for the <a href="http://msdn.microsoft.com/en-us/windows">Windows 8 Store</a>!</p></blockquote>
<p>Regarding performance, the developer section shows a comparison table with the average framerate on some different systems.</p>
<p style="text-align: center;"><img class="aligncenter" title="Cut The Rope HTML5 Framerate" src="http://www.cuttherope.ie/dev/notes-framerates.jpg" alt="" width="600" height="338" /></p>
<p>You can see that you can get almost the same Framerate whether using Win7,i7 CPU and 8GB RAM and a Win8,i5 CPU and 4GB RAM. But wait! RAM &#8220;quantity&#8221; is not really important, nor CPU speed. I think the most important component to compare here is the <strong>GPU (a lacking column in this table)</strong>, namely the GPU Clock Frequency and RAM, that have much more influence in FPS than the aspects shown here, so I&#8217;d like to see some independent tests and comparisons between Browsers on the same system (like they did with Windows 7 here, <strong>but with different systems</strong>, which will obviously change the results).</p>
<p>Appart from that browser wars, I was flabbergasted by seeing one of the last year&#8217;s most bought games running fully on JavaScript + HTML5. This shows how promising the web can be in the very near future.</p>
<p>Finally, here is the video on the dev page on <a href="http://www.youtube.com/watch?feature=player_embedded&amp;v=px_n1pNzEwI">YouTube</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/01/11/cut-the-rope-in-html-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Online Machine Learning Classes</title>
		<link>http://ricardo-dias.com/2012/01/10/free-online-machine-learning-classes/</link>
		<comments>http://ricardo-dias.com/2012/01/10/free-online-machine-learning-classes/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 13:27:33 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=324</guid>
		<description><![CDATA[Professor Andrew Ng and his team from University of Stanford provided free online lessons about machine learning. Students are provided video sessions and slide presentations in both PDF and PPTX, as well as some practical exercises. You don&#8217;t even need to &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/01/10/free-online-machine-learning-classes/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://ai.stanford.edu/~ang/">Professor Andrew Ng</a> and his team from University of Stanford provided free online lessons about machine learning. Students are provided video sessions and slide presentations in both PDF and PPTX, as well as some practical exercises.</p>
<p>You don&#8217;t even need to have a lot of Maths background, as the course has some introductory content on Algebra and other concepts that are needed to understand the more advanced lessons. Although the course is already finished, you can still register and watch the videos and download complete PDFs. Here is an overview of the course:</p>
<pre>01. Introduction to Machine Learning
02. Linear regression with one variable
03. Linear algebra review
04. Linear regression with multiple variables
05. Octave Tutorial
06. Logistic regression
07. Regularization
08. Neural Networks: Representation
09. Neural Networks: Learning
10. Advice for Applying Machine Learning
11. Machine Learning System Design
12. Support Vector Machines
13. Clustering
14. Dimensionality Reduction
15. Anomaly Detection
16. Recommender Systems
17. Learning with Large Datasets
18. Application Example: Photo OCR</pre>
<p>You can start yourself in machine learning today.<br />
Go to <a href="http://www.ml-class.org/">http://www.ml-class.org/</a>, register and take your time watching the videos and practicing.</p>
<div class="important_block">A new class will start at 23rd January 2012 &#8211; signup now at <a href="http://jan2012.ml-class.org/">http://jan2012.ml-class.org/</a></div>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/01/10/free-online-machine-learning-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing for Linux under OS X in XCode</title>
		<link>http://ricardo-dias.com/2012/01/08/developing-for-linux-under-os-x-in-xcode/</link>
		<comments>http://ricardo-dias.com/2012/01/08/developing-for-linux-under-os-x-in-xcode/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 20:09:45 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[Do It Yourself]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Others]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[cross-compile]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=288</guid>
		<description><![CDATA[In this mini-article I will show you how I develop applications for Linux in XCode 4. At the moment I&#8217;m using XCode 4.2.1, in OSX Lion, with Ubuntu 10.04 running on a virtual machine. Although the article is related to XCode, &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/01/08/developing-for-linux-under-os-x-in-xcode/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-319" style="border-style: none; border-color: initial; border-image: initial; border-width: 0px;" title="ubuntuxcodelogo" src="http://ricardo-dias.com/wp-content/uploads/ubuntuxcodelogo.png" alt="" width="500" height="350" /></p>
<p>In this mini-article I will show you how I develop applications for Linux in XCode 4. At the moment I&#8217;m using XCode 4.2.1, in OSX Lion, with Ubuntu 10.04 running on a virtual machine.</p>
<p>Although the article is related to XCode, after reading and trying out for yourself, you will notice that <strong>you can use whatever IDE you like</strong>. Here I&#8217;m just showing you how you can code in a OSX-only IDE and deploy in Linux.</p>
<h2>Requirements</h2>
<p>You will need some tools before we start:</p>
<ul>
<li><strong>VMWare</strong> or similar virtual machine application for Mac</li>
<ul>
<li>Used to run our Linux system, and that&#8217;s where we will compile and run the target application.<br />
You can also use a physical computer instead. However, you will need network connectivity from mac to that computer because the communication between this linux System and our Mac is done by SSH.</li>
</ul>
<li><strong>OSXFuse</strong></li>
<ul>
<li>Requirement for the next point</li>
</ul>
<li><strong>SSHFS</strong></li>
<ul>
<li>It will be used to mount a remote directory in our Mac, and access it as if it was an external hard disk drive</li>
</ul>
</ul>
<div><span style="font-size: x-small;"><span id="more-288"></span></span></div>
<p>Once you have all these, we are ready to go, but take some seconds to make sure you can compile the application in your slave Linux system. This will ensure that any problems you may encounter are not related to your slave machine or the code you are trying to compile.</p>
<h2>Accessing slave machine using SSH</h2>
<p>Now you will need the slave machine&#8217;s IP address, typing <strong>ifconfig</strong> in its Terminal.</p>
<p><a href="http://ricardo-dias.com/wp-content/uploads/vmifconfig.png"><img class="aligncenter size-medium wp-image-306" title="vmifconfig" src="http://ricardo-dias.com/wp-content/uploads/vmifconfig-300x232.png" alt="" width="300" height="232" /></a></p>
<p>As you can see in the image above, in my case I&#8217;ll be using <strong>172.16.68.128</strong> as the slave&#8217;s IP Address.</p>
<p>Then we make sure we can access it from your Mac typing the next command in Mac Terminal:</p>
<pre class="prettyprint lang-sh">ssh username@ip</pre>
<p>If we are asked for the password, then we got a valid SSH connection and we can move on&#8230;</p>
<h2>Adding an alias for the Linux Slave IP</h2>
<p>Because IPs can change sometimes, even inside Local Area Network, I added an alias for this IP, so that I could use it in scripts instead of the IP address itself. When it changes, I only have to modify one single file. You can do the same, by editing the hosts file, so grab the Mac Terminal and type as you see:</p>
<pre class="prettyprint lang-sh">sudo vim /etc/hosts</pre>
<p>Add a new line in the end, pressing <strong>I</strong> to enter insert mode:</p>
<pre class="prettyprint ">172.16.68.128 vmcode</pre>
<p>Now press <strong>ESC</strong> to exit &#8220;INSERT mode&#8221; and type <strong>:wq</strong> (yes, including the colon). If you have any problems using <strong>vim</strong> to edit this file, you can try <strong>nano</strong> instead &#8211; just replace &#8220;vim&#8221; with &#8220;nano&#8221; in the first command of this section. Now, you can use the virtual hostname &#8220;vmcode&#8221; instead of the real IP (which will be a lot easier to remember).</p>
<h2>Setup script files</h2>
<p>Now we need to setup two script files. I called them <strong>mountDir</strong> and <strong>sshbuild</strong>. The first one will mount the remote directory in our Mac and the latter is used to remotely compile the application.</p>
<p>Firstly pick a directory for these scripts, where you need to place the <strong>sshfs-static-leopard</strong> file, because it will be needed for the <strong>mountDir</strong> script.</p>
<h3>Mounting Directory Script</h3>
<p>Using your favorite text editor, create a new file called &#8220;mountDir&#8221; (no extension), and paste the following code:</p>
<pre class="prettyprint lang-sh">#!/bin/bash
echo password | ./sshfs-static-leopard username@vmcode:codedir ~/path/to/mount/dir -o password_stdin</pre>
<p>I&#8217;m explaining some of the variables in the command, that <strong>you should change</strong> to fit your needs:</p>
<ul>
<li><strong>username</strong> and <strong>password</strong> are the credentials for the user in the slave Linux machine</li>
<li><strong>codedir</strong> is the directory in slave machine you want to mount in Mac</li>
<li><strong>~/path/to/mount/dir</strong> is the path to the Mac&#8217;s directory where you want to mount the slave&#8217;s directory</li>
</ul>
<div><div class="warning_block">If you are using a real box instead of a VM, I recommend you configure ssh public keys instead of storing your password in plain text. You <strong>SHOULD NOT</strong> use the same password as of your Mac User</div></div>
<div>This was pointed by reader Daid, and I explained him I used it in plain text because I’m connecting to this VM, used only for compiling purposes and not accessible from outside, so I’m not that worried about it.</div>
<div><span style="font-size: x-small;"><br />
</span></div>
<h3>Building remotely</h3>
<p>The SSH command accepts a second argument, that is the command you want to execute right after the remote login. Save and create another file called &#8220;sshbuild&#8221; with the following content:</p>
<pre class="prettyprint lang-sh">#!/bin/bash
ssh username@vmcode 'cd codedir; make'</pre>
<p>Note that <strong>username</strong> and <strong>codedir</strong> must match the ones you used before.</p>
<h2>Setting up XCode</h2>
<p>Before we move to XCode, you first need to mount the directory: open the Terminal, <strong>cd</strong> to your scripts dir, and run <strong>sh mountDir</strong>. Now you should see the contents of remote dir in your Mac&#8217;s <strong>~/path/to/mount/dir</strong>.</p>
<div class="important_block">Any change you make to these files will be reproduced in the remote slave system (our VM), because SSHFS will be syncing in real-time.</div>
<p>Start XCode, then click <strong>File &gt; New &gt; New Workspace&#8230;</strong> and chose a location for the workspace file (I used the same as the scripts). You should see a window with three different spaces, they should have texts in the middle, from left ro right, saying <strong>&#8220;No Files&#8221;</strong>, <strong>&#8220;No Editor&#8221;</strong> and <strong>&#8220;No Selection&#8221;</strong>. Open a Finder window in the location <strong>~/path/to/mount/</strong> and then drag the subfolder that has a name starting with &#8220;OSXFUSE&#8221; to the <strong>&#8220;No Files&#8221;</strong> space in XCode.</p>
<p><a href="http://ricardo-dias.com/wp-content/uploads/xcodeaddfolder.png"><img class="aligncenter size-medium wp-image-309" title="xcodeaddfolder" src="http://ricardo-dias.com/wp-content/uploads/xcodeaddfolder-300x174.png" alt="" width="300" height="174" /></a></p>
<p>A popup will show up. Firstly, XCode will prompt you about your build tool. You should type the complete path to the <strong>sshbuild</strong> script, starting on root, on the &#8220;Build Tool&#8221; field.</p>
<p><a href="http://ricardo-dias.com/wp-content/uploads/xcodebuildtool.png"><img class="aligncenter size-medium wp-image-311" title="xcodebuildtool" src="http://ricardo-dias.com/wp-content/uploads/xcodebuildtool-300x175.png" alt="" width="300" height="175" /></a></p>
<p>After clicking &#8220;Next&#8221;, you will be presented something like the image below, you should select the second option, which is <strong>&#8220;Create folder references for any added folders&#8221;</strong>.</p>
<p><a href="http://ricardo-dias.com/wp-content/uploads/xcodereference.png"><img class="aligncenter size-medium wp-image-308" title="xcodereference" src="http://ricardo-dias.com/wp-content/uploads/xcodereference-300x203.png" alt="" width="300" height="203" /></a></p>
<p>Basically you are adding a reference to that directory, so instead of working in a local copy, you will edit the remote files directly. Now that you have all the directories in the slave&#8217;s <strong>codedir</strong> in the left panel of XCode, you can now open, edit and save any of your files using XCode. Now hit Command+B to run the build tool, and if everything goes well, you should see a message box saying <strong>Build Successful</strong>.</p>
<h2>Running the Application</h2>
<p>As you are developing for Linux, you should preferably debug under Linux. However, I often use an Application called <strong>X11</strong>, taht can be found in your <strong>Applications/Utilities</strong> folder. Type this command under X11 console window and the application should run in your Mac as if it was on Linux, even if it needs to open windows:</p>
<pre class="prettyprint lang-sh">ssh -X username@vmcode
cd codedir
./application</pre>
<h2>Conclusion</h2>
<p>Here I shown you how I develop applications for Linux using the resourceful XCode and all it&#8217;s features, without quitting Mac OSX. I hope you found it useful and it helps you by increasing your productivity. Leave a reply, share your thoughts and suggestions and happy coding <img src='http://ricardo-dias.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<h6>&#8211; edit 11/01/2012 &#8211;</h6>
<p>After reading this article, <a href="http://www.simonellistonball.com/" rel="external nofollow">Simon Elliston Ball</a> posted a reply with a <a href="http://www.simonellistonball.com/technology/os-x-for-the-coding-linux-for-deploying">link to his blog</a> suggesting a different solution &#8211; <strong><a href="http://vagrantup.com/">vagrant</a></strong> &#8211; that let&#8217;s you achieve the same results, but storing your files on Mac instead of the Linux system. I believe there are some advantages of doing this way, so you may choose the solution that best fits your needs. Thank you Simon.</p>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/01/08/developing-for-linux-under-os-x-in-xcode/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Applying nature-like algorithms to robots</title>
		<link>http://ricardo-dias.com/2012/01/06/applying-nature-like-algorithms-in-robots/</link>
		<comments>http://ricardo-dias.com/2012/01/06/applying-nature-like-algorithms-in-robots/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 19:54:47 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[Robotics]]></category>
		<category><![CDATA[robotics]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=275</guid>
		<description><![CDATA[It&#8217;s always amazing to see how nature is so beautiful that solves many of our difficult problems. By studying the tail technique of a lizard, a research group could effectively improve their robot&#8217;s stability just by adding an active tail &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/01/06/applying-nature-like-algorithms-in-robots/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><iframe src="http://www.youtube.com/embed/PZRRTSgBG60" frameborder="0" width="480" height="360"></iframe></p>
<p>It&#8217;s always amazing to see how nature is so beautiful that solves many of our difficult problems. By studying the tail technique of a lizard, a research group could effectively improve their robot&#8217;s stability just by adding an active tail to it with algorithms that somehow reproduce the animal&#8217;s behaviour.</p>
<p>Via <a href="http://spectrum.ieee.org/automaton/robotics/diy/dinosaurlike-tails-make-terrestrial-mobile-robots-more-agile">Automaton</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/01/06/applying-nature-like-algorithms-in-robots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The new NAO &#8220;Next Gen&#8221;</title>
		<link>http://ricardo-dias.com/2012/01/05/the-new-nao-next-gen/</link>
		<comments>http://ricardo-dias.com/2012/01/05/the-new-nao-next-gen/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 21:13:37 +0000</pubDate>
		<dc:creator>Ricardo Dias</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[humanoid]]></category>
		<category><![CDATA[nao]]></category>
		<category><![CDATA[robotics]]></category>

		<guid isPermaLink="false">http://ricardo-dias.com/?p=262</guid>
		<description><![CDATA[The new NAO has been presented by Aldebaran in this video, with a 1.6GHz processor and two HD cameras. The old version is the official platform for the RoboCup Standard Platform League, and in RoboCup 2011 (Istanbul, Turkey) I&#8217;ve came across &#8230; </p><p><a class="more-link block-button" href="http://ricardo-dias.com/2012/01/05/the-new-nao-next-gen/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><iframe src="http://www.youtube.com/embed/nNbj2G3GmAo" frameborder="0" width="560" height="315"></iframe></p>
<p>The new NAO has been presented by Aldebaran in this video, with a <strong>1.6GHz processor and two HD cameras</strong>. The old version is the official platform for the <a href="http://wiki.robocup.org/wiki/Standard_Platform_League">RoboCup Standard Platform League</a>, and in RoboCup 2011 (Istanbul, Turkey) I&#8217;ve came across some complaints about the NAO design, being most of them related to the <strong>hip joint</strong>. It saddens me that this issue wasn&#8217;t taken into account for the <strong>Next Gen</strong> version design.</p>
<p>I strongly believe the hardware improvements on the CPU and the cameras will make a difference, but let&#8217;s hope it&#8217;s for better. <strong>Higher resolutions and CPU speed always have higher power demands</strong>, so if they didn&#8217;t upgrade the battery capacity, we will watch more and more NAO falling to the ground, begging for some volts.</p>
<p>In terms of Software, Aldebaran&#8217; press release highlights the new &#8220;Nuance programme&#8221;, which is said to be &#8220;capable of isolating and recognizing a specific word within a sentence or a conversation&#8221;. We will be waiting to find out <strong>if this is the new competitor to Siri</strong> in voice recognition, or just another one.</p>
<p>Leave your message. <img src='http://ricardo-dias.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ricardo-dias.com/2012/01/05/the-new-nao-next-gen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

