tag:blogger.com,1999:blog-808527180822877332024-03-16T09:09:04.130+08:00Carving CodeBen Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.comBlogger48125tag:blogger.com,1999:blog-80852718082287733.post-39071732908021376032011-11-28T20:25:00.001+08:002011-11-28T20:39:14.021+08:00Multi Boot Thumb Drive with YUMI<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGGQzOIrZo4AnRLCzo6D34UbC6h_2k-0MAzgQ9C6YAFqBK7iW0inoXlbxrKdBrWJ77Jyu04ELvh6iQ2O9OWlRTYHCygLV2wTsPTsnHW-31Vdogd-cWt-ljC8gkoxYt3asSBNmjTTIhse5u/s1600/Yumi.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGGQzOIrZo4AnRLCzo6D34UbC6h_2k-0MAzgQ9C6YAFqBK7iW0inoXlbxrKdBrWJ77Jyu04ELvh6iQ2O9OWlRTYHCygLV2wTsPTsnHW-31Vdogd-cWt-ljC8gkoxYt3asSBNmjTTIhse5u/s320/Yumi.png" width="320" /></a></div>
<div style="text-align: left;">
There are a couple of Linux distros I use regularly for such activities as <a href="http://carvingcode.blogspot.com/2010/10/building-recoverable-developer-computer.html" target="_blank">creating recovery images of developer machines</a> and communications debugging. To avoid software installation on production systems I simply run these distros from a bootable thumb drive created with the help of a very useful tool called <a href="http://www.pendrivelinux.com/yumi-multiboot-usb-creator/" target="_blank">YUMI</a>.</div>
<div style="text-align: left;">
YUMI automates the installation of a number of supported distros onto the one thumb drive using a simple GUI. Once the distros are installed I simply create a folder on the thumb drive called "Data" and keep any docs etc that I need in there the same as I would on any other thumb drive.</div>Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com10Perth WA, Australia-31.9528536 115.8573389-31.9797991 115.8178569 -31.9259081 115.89682090000001tag:blogger.com,1999:blog-80852718082287733.post-81514275146194791672011-04-04T11:10:00.000+08:002011-04-04T11:10:31.474+08:00Hosts File Fixes PCS7 OS Project Download Errors<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil0CuFePOngLES5PFwd_GQPutLajn-cB2Rx_HO9D0YYXhCHZ0n_pHHh6X3VB-utnB0a61Y9vuk-jKv5kmYScdldw6vItR6vPBV-35WdikOGza-HKfOaLyxpSoD4mCLL5AgFEMJwjnSkJIU/s1600/pcs7.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil0CuFePOngLES5PFwd_GQPutLajn-cB2Rx_HO9D0YYXhCHZ0n_pHHh6X3VB-utnB0a61Y9vuk-jKv5kmYScdldw6vItR6vPBV-35WdikOGza-HKfOaLyxpSoD4mCLL5AgFEMJwjnSkJIU/s1600/pcs7.JPG" /></a></div>I was getting error message whenever attempting to download a PCS7 OS Client project. The Client PC had two network interfaces, one on the terminal network and another on an office network. On further investigation I found the following:<br />
<br />
<ul><li>Pinging by PC name from the PCS7 Engineering Server was resolving to the address on the office network, not that of the terminal network. </li>
<li>The Engineering Server LHMOSTS file had the client PC with the terminal network address</li>
<li>ipconfig /flushdns did not fix the problem</li>
</ul><div>After some googling I stumbled on the solution - the <b>hosts </b>file! It seems that <a href="http://support.microsoft.com/kb/105997">lmhosts and hosts are used by different utilites</a> and ping is one of the utilites that uses hosts. </div><div><br />
</div><div>After adding the correct name and ip address to hosts ping resolved to the desired address and PCS7 downloaded the OS client project without errors. This would indicate that PCS7 also uses hosts or at least the tcp/ip utilies like ping that reference it.</div>Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com16tag:blogger.com,1999:blog-80852718082287733.post-83464462673191467702011-01-07T10:36:00.001+08:002011-01-07T10:36:44.063+08:00RDP to Windows Server for Non-Administrator UsersWindows Server 2003 by default does not allow Remote Desktop Connections from users that are not part of the Administrators group.<br />
<br />
To get around this open a command prompt and enter the following:<br />
<br />
<i><span class="Apple-style-span" style="color: lime;">C:\> WMIC RDPermissions where "TerminalName='console'" call AddAccount "Remote Desktop Users", 2</span></i><br />
<i><span class="Apple-style-span" style="color: lime;"><br />
</span></i><br />
Any user added to the <i>Remote Desktop Users</i> group on the server will now be able to start an RDP session.Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com7tag:blogger.com,1999:blog-80852718082287733.post-85016515658275622782010-10-04T15:32:00.001+08:002010-10-04T15:32:11.556+08:00Building a Recoverable Developer Computer<p>I wanted a developers computer that can easily be reimaged to a vanilla XP install at the completion of each project. My main reason for this is due to the fact that control systems software does not always play well with products from other vendors so it is best to start a new project with a fresh install.</p> <p>The tool I ended up selecting to help with with this task was <a href="http://partedmagic.com/">Parted Magic</a>. This is basically a live cd Linux distribution that includes partitioning and cloning tools.</p> <p>The computer I performed this setup on originally had one full size system partition with Windows XP installed. What I wanted was three partitions.</p> <ul> <li>C: “System”</li> <li>E: “Recovery”</li> <li>F: “Data”</li></ul> <p>My plan being to store the vanilla XP <em>System</em> image on the <em>Recovery</em> partition where it can be easily restored over the used <em>System </em>partition at the commencement of a new project. The <em>Data</em> partition is the same as is seen everywhere to keep important data separate from OS installations.</p> <p>The steps I followed.</p> <ol> <li>Download the <a href="http://partedmagic.com/download.html">Parted Magic ISO</a> and burn to a CD</li> <li>Boot into the Parted Magic environment from the live CD</li> <li>Use the <a href="http://partedmagic.com/documentation/119-using-gparted.html">GParted tool as described on the Parted Magic site</a> to shrink my <em>System </em>partition</li> <li>Boot back into Windows XP and create the <em>Recovery</em> and <em>Data </em>Partitions. I made the <em>Recovery</em> partition identical in size to the <em>System</em> partition to avoid potential problems with imaging later</li> <li>Setup the XP system to a state that I want to be able to restore to later</li> <li>Boot into the Parted Magic environment</li> <li>Select System Tools –> Clonezilla</li> <li><em>device-image</em></li> <li><em>local_dev</em></li> <li><em>sda2 (Recovery)</em></li> <li><em>Expert</em></li> <li><em>saveparts</em></li> <li>I used the name “Vanilla-XP-img”</li> <li><em>sda1</em></li> <li>Agree to default options</li> <li>Increase the size of image file splits to something large to prevent splitting e.g <em>51200</em></li> <li>Agree to defaults and start</li></ol> <p>This leaves an image file on the recovery partition that can then be restored to the <em>System</em> partition to get back to a plain “Vanilla” XP install.</p> <p>The steps to recover a partition from an image are nearly identical to the above, with the exception of selection <em><strong>restoreparts</strong></em> instead of <em>saveparts</em>.</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:881b24a5-1af3-4f1c-871e-caafa48b2b62" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/clonezilla" rel="tag">clonezilla</a>,<a href="http://technorati.com/tags/windows" rel="tag">windows</a>,<a href="http://technorati.com/tags/xp" rel="tag">xp</a>,<a href="http://technorati.com/tags/image" rel="tag">image</a>,<a href="http://technorati.com/tags/recovery" rel="tag">recovery</a>,<a href="http://technorati.com/tags/partition" rel="tag">partition</a>,<a href="http://technorati.com/tags/howto" rel="tag">howto</a>,<a href="http://technorati.com/tags/parted+magic" rel="tag">parted magic</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com3tag:blogger.com,1999:blog-80852718082287733.post-58961520214941931842010-09-21T15:42:00.001+08:002010-09-21T15:42:05.166+08:00P2PU: Drupal Introduction #1<p>I’ve started two drupal courses through P2PU and want to keep my work on each separated. </p> <p>To achieve this I need:</p> <ul> <li>Two separate drupal folders <li>Two separate drupal databases <li>Two separate virtual sites for apache</li></ul> <p>I made the first site “drupalintro” in the same manner as outlined in my earlier post <a href="http://carvingcode.blogspot.com/2010/09/p2pu-drupal-social-web-application-1.html">P2PU: Drupal Social Web Application #1</a> with the following changes.</p> <ol> <li>The drupal directory was named <em>/var/www/<strong>drupalintro</strong></em> </li> <li>$ mysqladmin –u root –p create <strong>drupalintro</strong> </li> <li>mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON <strong>drupalintro</strong>.* TO <a href="mailto:drupaluser’@’localhost’">‘<drupaluser>’@’localhost’</a> IDENTIFIED BY ‘<drupalpass>’; </li> <li>mysql> FLUSH PRIVILEGES; </li> <li>mysql> \q </li> <li>$ vim /var/www/<strong>drupalintro</strong>/sites/default/settings.php </li> <li>edit: <em>$db_url = ‘mysql://<drupaluser>:<drupalpass>@localhost/<strong>drupalintro</strong>’;</em> </li> <li>$ cp /etc/apache2/sites-available/default /etc/apache2/sites-available/<strong>drupalintro</strong> </li> <li>$ vim /etc/apache2/sites-available/<strong>drupalintro</strong> </li> <li>edit: <em>DocumentRoot /var/www/<strong>drupalintro</strong></em></li> <li>edit: Directory /var/www/drupalintro</li></ol> <p>Now to make the second site called “openhippel” I did the same again with the following changes:</p> <ol> <li>The drupal directory was named <em>/var/www/openhippel</em></li> <li>$ mysqladmin –u root –p create <strong>openhippel</strong> </li> <li>mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON <strong>openhippel</strong>.* TO <a href="mailto:drupaluser’@’localhost’">‘<drupaluser>’@’localhost’</a> IDENTIFIED BY ‘<drupalpass>’; </li> <li>mysql> FLUSH PRIVILEGES; </li> <li>mysql> \q </li> <li>$ vim /var/www/<strong>openhippel</strong>/sites/default/settings.php </li> <li>edit: <em>$db_url = ‘mysql://<drupaluser>:<drupalpass>@localhost/<strong>openhippel</strong>;</em> </li> <li>$ cp /etc/apache2/sites-available/default /etc/apache2/sites-available/<strong>openhippel</strong> </li> <li>$ vim /etc/apache2/sites-available/<strong>openhippel</strong> </li> <li>edit: <em>DocumentRoot /var/www/<strong>openhippel</strong></em></li> <li>edit: Directory /var/www/<strong>openhippel</strong></li></ol> <p>Now to change between the two virtual sites I simply use the following (shown for selecting <em>drupalintro</em>)</p> <ol> <li>$ sudo a2dissite openhippel && sudo a2ensite drupalintro</li> <li>$ sudo /etc/init.d/apache2 reload</li></ol> <p>Then I can browse to my localhost address and see the home page for the desired site.</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9dc2220b-3187-400b-8591-829e71e00770" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/drupal" rel="tag">drupal</a>,<a href="http://technorati.com/tags/p2pu" rel="tag">p2pu</a>,<a href="http://technorati.com/tags/apache" rel="tag">apache</a>,<a href="http://technorati.com/tags/ubuntu" rel="tag">ubuntu</a>,<a href="http://technorati.com/tags/howto" rel="tag">howto</a>,<a href="http://technorati.com/tags/virtual+sites" rel="tag">virtual sites</a>,<a href="http://technorati.com/tags/mysql" rel="tag">mysql</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com3tag:blogger.com,1999:blog-80852718082287733.post-31845021298082346042010-09-18T23:15:00.001+08:002010-09-18T23:15:32.227+08:00P2PU: Drupal Social Web Application #2<p>Just finished the first Tokbox session for the Drupal Social Web course. Bit of a bumpy start with the first session starting half an hour late! </p> <p>I’m starting by forking three repositories from GitHub that will be used for this project. The repositories as I understand them are:</p> <ol> <li><a href="http://github.com/openhippel/hippel_idea">hippel_idea</a> the features package</li> <li><a href="http://github.com/openhippel/hippel_kit">hippel_kit</a> which will contain drush makefiles</li> <li><a href="http://github.com/openhippel/hippelicious">hippelicious</a> a hippel theme</li></ol> <p>It looks like the idea this week is to make sure we can fork these and edit them locally before commiting, pushing back to our own github forks and sending a pull request to the original repository.</p> <p>At this stage I will consider it an added bonus if I can make these work in my drupal install…</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f518a357-28d3-45b0-aef4-3aacbcc70103" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/p2pu" rel="tag">p2pu</a>,<a href="http://technorati.com/tags/drupal" rel="tag">drupal</a>,<a href="http://technorati.com/tags/openhippel" rel="tag">openhippel</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com3tag:blogger.com,1999:blog-80852718082287733.post-29876482195265157962010-09-15T22:08:00.001+08:002010-09-15T22:08:07.197+08:00P2PU: Drupal Social Web Application #1<p>I’ve enrolled in a P2PU course called <a href="http://p2pu.org/webcraft/drupal-social-web-application">Drupal Social Web Application</a>. Over the next 6 weeks I’ll be learning how to use Drupal and git while working on development of the Open Hippel platform. Most of this stuff is pretty new to me so I’ll be in over my head. I’ll also be moving house at the same time, hopefully without too much of a no interwebs period. When it rains it pours!</p> <p>I’ve been getting acquainted with Drupal this week and after some trials with the Ubuntu <em>drupal6</em> package I’ve opted for the <a href="https://help.ubuntu.com/community/Drupal">manual installation of Drupal</a> as outlined in the Ubuntu Community Documentation. The manual installation allows me some more flexibility in terms of where I keep my files and which version I use when compared to a package install.</p> <p>Here is a brief outline of the steps I followed on an Ubuntu Server 10.04 virtual machine.</p> <ol> <li>$ cd ~</li> <li>$ wget <a title="http://ftp.drupal.org/files/projects/drupal-6.19.tar.gz" href="http://ftp.drupal.org/files/projects/drupal-6.19.tar.gz">http://ftp.drupal.org/files/projects/drupal-6.19.tar.gz</a></li> <li>$ tar zxvf drupal-6.19.tar.gz</li> <li>$ sudo mkdir /var/www/drupal</li> <li>$ sudo mv drupal-6.19/* drupal-6.19/.htaccess /var/www/drupal</li> <li>$ sudo mkdir /var/www/drupal/sites/default/files</li> <li>$ sudo chown www-data:www-data /var/www/drupal/sites/default/files</li> <li>$ sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php</li> <li>$ sudo chown www-data:www-data /var/www/drupal/sites/default/settings.php</li> <li>$ mysqladmin –u root –p create drupal</li> <li>$ mysql –u root –p</li> <li>mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO <a href="mailto:drupaluser’@’localhost’">‘<drupaluser>’@’localhost’</a> IDENTIFIED BY ‘<drupalpass>’;</li> <li>mysql> FLUSH PRIVILEGES;</li> <li>mysql> \q</li> <li>$ vim /var/www/drupal/sites/default/settings.php</li> <li>edit: <em>$db_url = ‘mysql://<drupaluser>:<drupalpass>@localhost/drupal’;</em></li> <li>$ cp /etc/apache2/sites-available/default /etc/apache2/sites-available/drupal</li> <li>$ vim /etc/apache2/sites-available/drupal</li> <li>edit: <em>DocumentRoot /var/www/drupal</em></li> <li>$ sudo a2dissite default && a2ensite drupal</li> <li>$ sudo /etc/init.d/apache2 reload</li> <li>From the host (or any machine on the same network) browse to “<server ip>/install.php” and follow the web based setup for Drupal</li></ol> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:77570534-f5eb-4cef-9f03-a8b7173d3b10" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/p2pu" rel="tag">p2pu</a>,<a href="http://technorati.com/tags/drupal" rel="tag">drupal</a>,<a href="http://technorati.com/tags/ubuntu" rel="tag">ubuntu</a>,<a href="http://technorati.com/tags/howto" rel="tag">howto</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com10tag:blogger.com,1999:blog-80852718082287733.post-50817065028929862662010-09-14T21:28:00.001+08:002010-09-14T21:28:30.156+08:00Mount a Windows Share in Ubuntu Server<p>It is really ease to access a windows share from the console of Ubuntu Server. The following steps were performed on Ubuntu Server 10.04 to access a share on a QNAP NAS with no username or password required.</p> <ol> <li>$sudo apt-get install smbfs</li> <li>$mkdir ~/temp</li> <li>$sudo mount.cifs //192.168.0.x/public ~/temp</li></ol> <p>Now it is possible to cd into temp and ls the contents of the public share.</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9dc5cb7f-9c24-466c-ab26-09609fec24db" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/windows" rel="tag">windows</a>,<a href="http://technorati.com/tags/ubuntu" rel="tag">ubuntu</a>,<a href="http://technorati.com/tags/share" rel="tag">share</a>,<a href="http://technorati.com/tags/mount" rel="tag">mount</a>,<a href="http://technorati.com/tags/howto" rel="tag">howto</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com1tag:blogger.com,1999:blog-80852718082287733.post-21456441999262187532010-08-31T14:34:00.001+08:002010-08-31T14:34:41.651+08:00Git and GitHub<p>I recently brought up version control systems at a circuit hacking evening at the <a href="http://artifactory.org.au/">Artifactory</a>. Not surprisingly for a room of open source/linux type people almost everyone was in favour of using <a href="http://git-scm.com/">git</a>. I was even pointed to a youtube video of <a href="http://www.youtube.com/watch?v=4XpnKHJAok8">Linus Torvalds on git</a> which is not a tutorial on how to use git but does provide a good overview of why it might be better than other version control systems. I also found the video quite amusing due to Linus’ famously abrupt manner.</p> <p>My concern with using git was that I am a windows user and didn’t expect it to work natively with windows. It doesn’t matter how many ways git is superior to other version control systems, if it doesn’t work well on windows it’s not for me.</p> <p>Fearing that I would be wasting my time I tried out <a href="http://code.google.com/p/msysgit/">msysgit</a> (git for windows) which includes such goodies as shell integration that allows for a gui or bash interface for managing repositories. It actually turned out to be quite good. The interface is not as nice as TortoiseSVN but the distributed version control nature of git more than makes up for that.</p> <p>The only way to properly test something like this out is to use it on a real project so I started using git for version control of my <a href="http://carvingcode.blogspot.com/2010/07/balancebot-2.html">BalanceBot</a> project on my laptop. </p> <p>I don’t like to have anything which is important to me stored in only one location so after checking out my options I started a <a href="https://github.com/">GitHub</a> account. It’s a safe place to push repositories to and it’s free as long as your projects are open source. There is also a neat <em>Watch</em> function that allows you to track other interesting repositories, kind of like social media for code.</p> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com2tag:blogger.com,1999:blog-80852718082287733.post-44410388600810383532010-07-26T22:14:00.001+08:002010-07-26T22:14:48.036+08:00BalanceBot 2<p>I finally have communication between an Arduino and an ADXL345 accelerometer over SPI! </p> <p>I used the SPI library from the Arduino playground but was still having trouble so in the end resorted to following the example source code provided by sparkfun for the ATmega328.</p> <p>The following listing is copied straight from my Arduino environment.</p> <p><font color="#00ff00">#include <Spi.h> </font> <p><font color="#00ff00">/*<br> BalanceBot<br> Read from an accelerometer ADXL345.<br> ADXL345 max clock speed is 5MHz, default arduino CLKi/o is 16MHz/64 (OK)<br> ***SPI Pins***<br> SCK PB5 13 <br> MISO PB4 12<br> MOSI PB3 11<br> SS Any 10<br> Ben Caldwell<br> */ </font> <p><font color="#00ff00">byte tmp;<br>byte readData; //The byte that data read from SPI interface will be stored in <br>byte fifo[6]; //data read for x,y,z axis from the accelerometer's FIFO buffer<br>float x,y,z; //The ranged x,y,z data<br>float range; //The range of the x,y,z data returned </font> <p><font color="#00ff00">// The setup() method runs once, when the sketch starts </font> <p><font color="#00ff00">void setup() { <br> Serial.begin(9600);<br> Spi.mode((1<<SPE) | (1<<MSTR) | (1<<CPOL) | (1<<CPHA) | (1<<SPR1) | (1<<SPR0)); </font> <p><font color="#00ff00"> Serial.println("Starting Setup");<br> //Set SS high, slave disabled waiting to pull low for first exchange<br> digitalWrite(SS_PIN, HIGH);<br> delay(4000);<br> //Wait for POWER_CTL register to go to correct state<br> readData = 0x00;<br> while (readData != 0x28)<br> { <br> //POWER_CTL register: measure<br> digitalWrite(SS_PIN, LOW);<br> Spi.transfer(0x2D);<br> Spi.transfer(0x28); //Measure<br> digitalWrite(SS_PIN, HIGH);<br> delay(5);<br> digitalWrite(SS_PIN, LOW);<br> Spi.transfer(1<<7 | 0x2D); //Set "read" MSb<br> readData = Spi.transfer(0x00); //Send dummy byte to keep clock pulse going!<br> digitalWrite(SS_PIN, HIGH);<br> Serial.print("POWER_CTL: ");<br> Serial.println(readData, HEX);<br> delay(1000);<br> }<br> //Set FORMAT<br> digitalWrite(SS_PIN, LOW);<br> Spi.transfer(0x31);<br> Spi.transfer(0x08); <br> digitalWrite(SS_PIN, HIGH);<br> delay(5);<br> //Readback FORMAT<br> digitalWrite(SS_PIN, LOW);<br> Spi.transfer(1<<7 | 0x31);<br> readData = Spi.transfer(0x00); <br> digitalWrite(SS_PIN, HIGH);<br> readData = readData & 0x03;<br> switch (readData)<br> {<br> case 0:<br> range = 2.0;<br> break;<br> case 1:<br> range = 4.0;<br> break;<br> case 2:<br> range = 8.0;<br> break;<br> case 3:<br> range = 16.0;<br> break;<br> }<br> Serial.print("FORMAT: ");<br> Serial.println(readData, HEX);<br> //Set FIFO<br> digitalWrite(SS_PIN, LOW);<br> Spi.transfer(0x38);<br> Spi.transfer(0x00); <br> digitalWrite(SS_PIN, HIGH);<br> delay(5);<br> //Readback FIFO<br> digitalWrite(SS_PIN, LOW);<br> Spi.transfer(1<<7 | 0x38);<br> readData = Spi.transfer(0x00); <br> digitalWrite(SS_PIN, HIGH);<br> Serial.print("FIFO: ");<br> Serial.println(readData, HEX);<br> delay(4000);<br>} </font> <p><font color="#00ff00">// the loop() method runs over and over again,<br>// as long as the Arduino has power </font> <p><font color="#00ff00">void loop() <br>{ <br> //All x,y,z data must be read from FIFO in a multiread burst<br> digitalWrite(SS_PIN, LOW);<br> //Start reading at 0x32 and set "Read" and "Multi" bits<br> Spi.transfer(1<<7 | 1<<6 | 0x32);<br> for (int i=0; i<6; i++)<br> {<br> fifo[i] = Spi.transfer(0x00);<br> }<br> digitalWrite(SS_PIN, HIGH);<br> delay(5);<br> //The measurements in the FIFO 10bit <br> x = (float)((fifo[1]<<8) | fifo[0]) * range / 512.0;<br> y = (float)((fifo[3]<<8) | fifo[2]) * range / 512.0;<br> z = (float)((fifo[5]<<8) | fifo[4]) * range / 512.0;<br> Serial.println("********************");<br> Serial.print("[X,Y,Z](g): [");<br> Serial.print(x);<br> Serial.print(",");<br> Serial.print(y);<br> Serial.print(",");<br> Serial.print(z);<br> Serial.println("]");<br> delay(1000); </font> <p><font color="#00ff00">}</font> <p> </p> <p>References</p> <ol> <li>The SEN-09156 breakout board:<br><a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9156">http://www.sparkfun.com/commerce/product_info.php?products_id=9156</a> <li>Sparkfun example code:<br><a title="http://www.sparkfun.com/datasheets/Sensors/Accelerometer/ADXL345-talktest.zip" href="http://www.sparkfun.com/datasheets/Sensors/Accelerometer/ADXL345-talktest.zip">http://www.sparkfun.com/datasheets/Sensors/Accelerometer/ADXL345-talktest.zip</a> <li>Arduino SPI library:<br><a href="http://www.arduino.cc/playground/Code/Spi">http://www.arduino.cc/playground/Code/Spi</a></li></ol> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ce827323-b4ac-4b65-be44-9562bbb3d686" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/arduino" rel="tag">arduino</a>,<a href="http://technorati.com/tags/ADXL345" rel="tag">ADXL345</a>,<a href="http://technorati.com/tags/SPI" rel="tag">SPI</a>,<a href="http://technorati.com/tags/accelerometer" rel="tag">accelerometer</a>,<a href="http://technorati.com/tags/howto" rel="tag">howto</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com1tag:blogger.com,1999:blog-80852718082287733.post-70839725050888934242010-07-09T09:49:00.001+08:002010-07-09T09:49:57.592+08:00Convert DVDs to MKV<p>I’ve been looking at options for ripping my DVDs to my home <a href="http://www.qnap.com/pro_detail_feature.asp?p_id=135">NAS</a> that I connect to with a <a href="http://store.westerndigital.com/store/wdau/en_AU/DisplayProductDetailsPage/ThemeID.13825600/categoryID.38679000/parid.38677900/catid.38678100">media streamer</a>. Anyone who has ever tried ripping DVDs will know that this can be an overly complicated and often disappointing task.</p> <p>I recently had the most success to date using a utility called <a href="http://www.makemkv.com/">MakeMKV</a>. This utility takes the files in the Audio_TS and Video_TS folders and encapsulates them in a single .<a href="http://en.wikipedia.org/wiki/Matroska">mkv</a> file for each title on the DVD.</p> <p>My <a href="http://store.westerndigital.com/store/wdau/en_AU/DisplayProductDetailsPage/ThemeID.13825600/categoryID.38679000/parid.38677900/catid.38678100">WD TV Live</a> plays MKV files perfectly, the quality looks the same as the original DVD to me. For PC playback I was disappointed to see WMP does not play MKV files out of the box, but there are plenty of options out there in the form of <a href="http://www.cccp-project.net/">codecs</a> and <a href="http://www.videolan.org/vlc/">alternative free players</a>.</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a3957e90-354e-4b6a-abcd-c362e119ec66" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/dvd" rel="tag">dvd</a>,<a href="http://technorati.com/tags/rip" rel="tag">rip</a>,<a href="http://technorati.com/tags/convert" rel="tag">convert</a>,<a href="http://technorati.com/tags/nas" rel="tag">nas</a>,<a href="http://technorati.com/tags/media+streamer" rel="tag">media streamer</a>,<a href="http://technorati.com/tags/mkv" rel="tag">mkv</a>,<a href="http://technorati.com/tags/howto" rel="tag">howto</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-47618147702129667172010-06-29T21:58:00.001+08:002010-06-29T21:58:01.299+08:00BalanceBot<p>I decided on a new project while at circuit hacking night at Artifactory last night. In my head it looks something like an unmanned segway…</p> <p>For the controller I’ll be using an Arduino Duemilanove that I already have, and the accelerometer will be an ADXL345 3 axis accelerometer with a SPI/I2C digital interface. It seemed less than elegant to me to use an accelerometer with analog outputs as a digital signal would need to go through a D/A converter before travelling through a length of hookup wire then through an A/D converter where it can finally be used by my program in the Arduino. </p> <p>So my first step is going to be getting data from the accelerometer to the Arduino, and not knowing the first thing about SPI or I2C is going to make this a steep learning curve!</p> <p>I’ve created a BalanceBot library in Eagle and created an ADXL345 device. This should allow me to not only create a schematic for bread boarding but a PCB later if I’m so inclined.</p> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-50170983549488432652010-06-21T13:29:00.001+08:002010-06-21T13:29:07.904+08:00Remove Linefeeds from an Excel Document<p>I recently received an Excel document that needed to be massaged to suit the requirements of a DCS. One of the changes required was the removal of line feeds from within cells. There were over 500 rows nearly all with multiple line feeds so I did not want to do this manually.</p> <p>Some googling revealed an easy way to do this and a cool new tool to try – immediate mode in VBE.</p> <ol> <li>On the Excel worksheet select all cells that may contain a line feed to remove <li>Open VBE using alt+F11 <li>Enter Immediate mode by pressing ctrl+G <li>In the Immediate box type <font color="#00ff00">Selection.Replace Chr(10),””</font> In Immediate whenever you hit enter your command is executed. <li>Go back to the worksheet and all line feeds are removed</li></ol> <p>Note that the argument for the Chr function is a char code. Char codes are the same as ASCII codes for the first 32 control code characters so line feed is alt+0010 or Chr(10).</p> <p>References:<br><a href="http://www.ozgrid.com/forum/showthread.php?t=20451">http://www.ozgrid.com/forum/showthread.php?t=20451</a></p> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-52198089130397411162010-06-14T20:42:00.001+08:002010-06-14T20:42:40.383+08:00GanttProject<p>In a <a href="http://carvingcode.blogspot.com/2010/03/open-source-project-management-software.html">previous post</a> I mentioned that I was looking into open source project management software. I was a little sad to find that most of the software I tried had one glaring oversight or another. The program that I tried initially and then kept coming back to was <a href="http://www.ganttproject.biz/">GanttProject</a>. </p> <p>The GanttProject features that I use are:</p> <ul> <li>Gantt chart</li> <li>Linking (start-finish, start-start etc.)</li> <li>Resources can be created/imported and assigned to tasks. Resource utilisation is calculated automatically</li> <li>Completion tracking on the Gantt chart</li></ul> <p>This is a simple feature set and by far the best of what is on offer from the open source world for project management.</p> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-80508034333543407312010-05-04T21:47:00.001+08:002010-05-04T21:47:44.749+08:00HP Flight Button Fixed with a ROM Update<p>I’ve been mildly annoyed for the last week with a malfunction of the flight mode button on my HP 6730s laptop. Out of the blue the button started toggling between wifi and bluetooth radios. Pressing the button allowed me to choose between bluetooth or wifi but I could never turn both radios on, or more importantly for flying turn both radios off!</p> <p>After a short and very helpful online chat with HP support I updated my BIOS and everything is fixed! HP support has been awesome every time I’ve needed it.</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:79e71cdd-c9ec-43ef-93d4-d89984ea7cf0" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Laptop" rel="tag">Laptop</a>,<a href="http://technorati.com/tags/HP" rel="tag">HP</a>,<a href="http://technorati.com/tags/flight+mode" rel="tag">flight mode</a>,<a href="http://technorati.com/tags/wifi" rel="tag">wifi</a>,<a href="http://technorati.com/tags/bluetooth" rel="tag">bluetooth</a>,<a href="http://technorati.com/tags/ROM" rel="tag">ROM</a>,<a href="http://technorati.com/tags/BIOS" rel="tag">BIOS</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com1tag:blogger.com,1999:blog-80852718082287733.post-48394166158822011212010-04-28T20:09:00.001+08:002010-04-28T20:12:09.636+08:00Creating a WCF Web Service with VS2010 Express<p></p> <p></p> <p>Last night while I was reading up on OPC-XML the interwebs took me on a merry trail of SOAP, XML-RPC and the like that ended with WCF Web Services. I found a very good tutorial on WCF Services at <a href="http://www.xvpj.net/2008/03/08/wcf-step-by-step-tutorial/">http://www.xvpj.net/2008/03/08/wcf-step-by-step-tutorial/</a> but this was for Visual Studio 2005. I only have express versions of Visual Studio 2010 so there were some things that needed to be done differently. In the interests of posterity here is how I wrote a very simple WCF web service and a WPF client that accesses it using only Visual Web Developer 2010 Express and Visual C# 2010 Express.</p> <h3>Configure the Development Environment</h3> <ol> <li>Install Microsoft Visual C# 2010 Express </li> <li>Install Microsoft Visual Web Developer 2010 Express installed (you can download all Express editions on one iso image at <a href="http://www.microsoft.com/express/Downloads/#2010-All">http://www.microsoft.com/express/Downloads/#2010-All</a>) </li> <li>Enable Windows features: <ol> <li>IIS Metabase and IIS 6 configuration compatibility </li> <li>IIS Management Console </li> <li>ASP.NET <br />  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="iis_features" border="0" alt="iis_features" src="http://lh5.ggpht.com/_9NmpACXyf3o/S9glToP-umI/AAAAAAAABUk/UyEDDoV4aZY/iis_features5.png?imgmax=800" width="207" height="244" /> </li> </ol> </li> <li>In IIS Manager, under Application Pools right click DefaultAppPool, select Basic Settings then change .NET framework version to v4.0.x <br /><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="iis_manager" border="0" alt="iis_manager" src="http://lh3.ggpht.com/_9NmpACXyf3o/S9glUdV9u2I/AAAAAAAABUo/ZckYP2X2QJg/iis_manager4.png?imgmax=800" width="269" height="162" /> </li> <li>Install Windows SDK. This can be downloaded from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en</a>  </li> </ol> <h3>Create the Web Service</h3> <ol> <li>First we will create the web service. To do this we need to run Visual Web Developer 2010 Express with administrator privileges so hit the start button type in “web dev” or similar and when Web Developer is highlighted press ctrl+shift+enter. This will start it as an administrator and show the UAC prompt. Alternatively locate Web Developer in the start menu then right click and select run as administrator. <br /></li> <li>Select File –> New web site and choose WCF Service and name it MultiplyService <br /><a href="http://lh6.ggpht.com/_9NmpACXyf3o/S9glVPqpqpI/AAAAAAAABUs/CFEH2k51zbg/s1600-h/new_web_site2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="new_web_site" border="0" alt="new_web_site" src="http://lh6.ggpht.com/_9NmpACXyf3o/S9glVzEqtaI/AAAAAAAABUw/n84NwxUGrD4/new_web_site_thumb.png?imgmax=800" width="244" height="157" /></a> <br /></li> <li>Add code App_Code / IService.cs   <br /><a href="http://lh6.ggpht.com/_9NmpACXyf3o/S9glWYjwAFI/AAAAAAAABU0/CaxKLhudJGw/s1600-h/IService%5B8%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IService" border="0" alt="IService" src="http://lh6.ggpht.com/_9NmpACXyf3o/S9glXEtpsEI/AAAAAAAABU4/M7PChVeMMiA/IService_thumb%5B4%5D.png?imgmax=800" width="418" height="188" /></a> <br /></li> <li>Add code to App_Code / Service.cs <br /><a href="http://lh5.ggpht.com/_9NmpACXyf3o/S9glXg42ruI/AAAAAAAABU8/NbJgc9p1pxk/s1600-h/Service%5B4%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Service" border="0" alt="Service" src="http://lh4.ggpht.com/_9NmpACXyf3o/S9glYQr-wnI/AAAAAAAABVA/ajOXxEb-X5k/Service_thumb%5B2%5D.png?imgmax=800" width="416" height="220" /></a> <br /></li> <li>Run the service by pressing ctrl F5 and click the Service.svc link in the page that opens. Nothing much to see here yet, you need a client to view this data. As indicated on the page you need to run the svcutil.exe utility to generate code that will be used by the client application <br /><a href="http://lh4.ggpht.com/_9NmpACXyf3o/S9glZHM3MzI/AAAAAAAABWQ/Hn5F7D9YWcE/s1600-h/svcutil1%5B7%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="svcutil1" border="0" alt="svcutil1" src="http://lh6.ggpht.com/_9NmpACXyf3o/S9glZg4jKLI/AAAAAAAABWU/Vxa12b4k8Tg/svcutil1_thumb%5B5%5D.png?imgmax=800" width="454" height="36" /></a> <br /> <br />The svcutil.exe utility is installed with the Windows SDK and can be found at <em>c:\Program Files\Microsoft SDKs\Windows\v6.0a\bin</em> <br /> <br />To create the Service.cs file on the desktop try the following in a cmd prompt: <br /><a href="http://lh4.ggpht.com/_9NmpACXyf3o/S9glaYUa5sI/AAAAAAAABWc/ixWn6aZ4_pI/s1600-h/svcutil2%5B7%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="svcutil2" border="0" alt="svcutil2" src="http://lh3.ggpht.com/_9NmpACXyf3o/S9glbCc2E3I/AAAAAAAABWk/YXdqjk7R47w/svcutil2_thumb%5B5%5D.png?imgmax=800" width="457" height="119" /></a>  <br /></li> <li>That ends the WCF service. Leave all of this running, including the internet explorer window that Web Developer opened and open Visual C# Express to start on the client application. </li> </ol> <h3> </h3> <h3>Create the Client Application</h3> <ol> <li>Start up Visual C# 2010 Express and select File –> New Project. Select WPF Application and name it MultiplyClient. </li> <li>Add a Service Reference <br /><a href="http://lh4.ggpht.com/_9NmpACXyf3o/S9glb-xYDGI/AAAAAAAABVU/7BJqICe1Xu0/s1600-h/service_ref%5B3%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="service_ref" border="0" alt="service_ref" src="http://lh5.ggpht.com/_9NmpACXyf3o/S9glc1V5NFI/AAAAAAAABVY/Ft2pyaRpuLY/service_ref_thumb%5B1%5D.png?imgmax=800" width="298" height="149" /></a> <br /> <br />In the Service Reference dialog paste in the address from the internet explorer window that web developer opened. Select the service and select OK <br /><a href="http://lh6.ggpht.com/_9NmpACXyf3o/S9gldbjQ6XI/AAAAAAAABVc/GTq51KCifPw/s1600-h/Service_ref2%5B4%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Service_ref2" border="0" alt="Service_ref2" src="http://lh6.ggpht.com/_9NmpACXyf3o/S9gleCERoWI/AAAAAAAABVg/edfayjHbAPQ/Service_ref2_thumb%5B2%5D.png?imgmax=800" width="397" height="317" /></a> <br /></li> <li>Copy the Service.cs file on the desktop that was generated by svcutil into the root folder of the project <br /><a href="http://lh4.ggpht.com/_9NmpACXyf3o/S9gle2NgtZI/AAAAAAAABVk/cTKlEZiVanI/s1600-h/add_cs%5B3%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="add_cs" border="0" alt="add_cs" src="http://lh5.ggpht.com/_9NmpACXyf3o/S9glfktuNxI/AAAAAAAABVo/2LPu-rG-9Hc/add_cs_thumb%5B1%5D.png?imgmax=800" width="188" height="200" /></a> <br /></li> <li>Add two entry textboxes, a multiply button and a result textbox to the MainWindow.xaml <br /><a href="http://lh4.ggpht.com/_9NmpACXyf3o/S9glgLxXXvI/AAAAAAAABVs/sWaUmwXIt6k/s1600-h/mainwindow%5B4%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="mainwindow" border="0" alt="mainwindow" src="http://lh6.ggpht.com/_9NmpACXyf3o/S9glgqcDu0I/AAAAAAAABVw/odhMlNAoHGM/mainwindow_thumb%5B2%5D.png?imgmax=800" width="390" height="202" /></a> <br /></li> <li>Add code to MainWindow.xaml.cs to call the service when the multiply button is clicked <br /><a href="http://lh6.ggpht.com/_9NmpACXyf3o/S9glhHC9m0I/AAAAAAAABV0/rZAbOGRzLCU/s1600-h/mainwindow2%5B5%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="mainwindow2" border="0" alt="mainwindow2" src="http://lh4.ggpht.com/_9NmpACXyf3o/S9gliKcbujI/AAAAAAAABV4/lH6OkDPEXsg/mainwindow2_thumb%5B3%5D.png?imgmax=800" width="425" height="290" /></a> <br /></li> <li>Modify the app.config file. Simply change the contract value from “ServiceReference1.IService” to “IService” <br /><a href="http://lh6.ggpht.com/_9NmpACXyf3o/S9gli2-O2fI/AAAAAAAABWs/3Hz0f5NPJe4/s1600-h/appconfig%5B6%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="appconfig" border="0" alt="appconfig" src="http://lh5.ggpht.com/_9NmpACXyf3o/S9glj6JxFXI/AAAAAAAABWw/577BxgXhoQQ/appconfig_thumb%5B4%5D.png?imgmax=800" width="422" height="252" /></a> </li> <li>Press ctrl+F5 to run the WPF application. Enter two values to multiply and hit the Multiply button, you should see the answer in the result textbox! <br /><a href="http://lh3.ggpht.com/_9NmpACXyf3o/S9glkephuQI/AAAAAAAABWE/s_PleuZCKpg/s1600-h/clientapp%5B4%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clientapp" border="0" alt="clientapp" src="http://lh5.ggpht.com/_9NmpACXyf3o/S9gllGfAB9I/AAAAAAAABWM/Q5EbDCBJGmM/clientapp_thumb%5B2%5D.png?imgmax=800" width="397" height="266" /></a> </li> </ol> <h3> </h3> <h3>References</h3> <ol> <li>The basic gist of WCF services: <br /><a href="http://www.xvpj.net/2008/03/08/wcf-step-by-step-tutorial/">http://www.xvpj.net/2008/03/08/wcf-step-by-step-tutorial/</a> </li> <li>Adding IIS features: <br /><a href="http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windows-vista/">http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windows-vista/</a> </li> <li>Where to find the svcutil.exe utility: <br /><a href="http://www.dotnetspider.com/forum/239950-Where-find-svcutil-exe.aspx">http://www.dotnetspider.com/forum/239950-Where-find-svcutil-exe.aspx</a> </li> </ol> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4c2f76d9-ebbb-4493-a8a1-4bf1163e94e3" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/WCF" rel="tag">WCF</a>,<a href="http://technorati.com/tags/Web+Service" rel="tag">Web Service</a>,<a href="http://technorati.com/tags/Tutorial" rel="tag">Tutorial</a>,<a href="http://technorati.com/tags/How+to" rel="tag">How to</a>,<a href="http://technorati.com/tags/Visual+C%23+2010+Express" rel="tag">Visual C# 2010 Express</a>,<a href="http://technorati.com/tags/Visual+Web+Developer+2010+Express" rel="tag">Visual Web Developer 2010 Express</a>,<a href="http://technorati.com/tags/.NET" rel="tag">.NET</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com158tag:blogger.com,1999:blog-80852718082287733.post-8136689295420236572010-04-09T21:17:00.001+08:002010-04-09T21:17:59.296+08:00OpenVPN on Windows 7<p><a href="http://openvpn.net/index.php/open-source/downloads.html"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="OpenVPN" border="0" alt="OpenVPN" align="right" src="http://lh4.ggpht.com/_9NmpACXyf3o/S78pBlm-VII/AAAAAAAABTs/tr1JXuRxxaQ/tryus%5B8%5D.png?imgmax=800" width="121" height="120" /></a>I had some trouble getting OpenVPN to work on my Windows 7 laptop. After a lot of messing around it turns out to be a fairly simple operation, so to save others the messing around part here are the steps to follow.</p> <ol> <li>Download the <strong>latest</strong> OpenVPN windows installer from <a href="http://openvpn.net/index.php/open-source/downloads.html">http://openvpn.net/index.php/open-source/downloads.html</a> I used openvpn-2.1.1-install.exe</li> <li>Completely uninstall any previous versions of OpenVPN from your machine</li> <li>Install OpenVPN</li> <li>On the start menu right click “OpenVPN GUI” and click properties. On the Compatibility tab select “Change settings for all users” then tick the box “Run this program as an administrator”</li> <li>This step is not so obvious. Open the network and sharing centre and click on “Change adapter settings”. There should be a Local Area Connection with the type TAP-Win32 Adapter, right click on this and select properties. Tick the boxes next to “Internet Protocol Version 6 (TCP/IPv6)” and “Internet Protocol Version 4 (TCP/IPv4)”</li> <li>Copy your config and credentials files into the C:\Program Files\OpenVPN\config folder</li> <li>Now click OpenVPN-GUI in the start menu. You’ll have to enter your Administrator password to run it. When it’s running just right click on the OpenVPN icon in the system tray and select connect</li> </ol> <p>And that’s it! I hope it works for you too, leave a comment to let me know…</p> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com5tag:blogger.com,1999:blog-80852718082287733.post-65976905381099753342010-03-24T21:14:00.001+08:002010-03-24T21:14:16.069+08:00Open Source Project Management Software<p></p> <p></p> <p>I work for a small business and lately it is becoming apparent that we need some project management software. The budget price at the moment is $0 so to stay legal I’m investigating what options are available from the open source side of the fence.</p> <p>Our primary business is the development of automation software but the scope of projects often includes managing third party hardware production and procurement. The features I’m looking for in project management software are:</p> <ul> <li>Task scheduling </li> <li>Resource scheduling </li> <li>Time tracking </li> <li>Percentage completion tracking </li> <li>Charting – Gantt charts at least </li> </ul> <p>Using the above criteria in a trawl of the web I found the packages <a href="http://www.redmine.org/">Redmine</a>, <a href="http://openproj.org/openproj">OpenProj</a>, <a href="http://www.ganttproject.biz/">Gantt Project</a> and <a href="http://www.clockingit.com/">ClockingIT</a>. I will follow up with a post on my experience with each of these in the coming weeks.</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ab6a6fb9-347e-4138-8637-52ce356fbb46" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Project+Management" rel="tag">Project Management</a>,<a href="http://technorati.com/tags/Open+Source" rel="tag">Open Source</a>,<a href="http://technorati.com/tags/Gantt+Chart" rel="tag">Gantt Chart</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com1tag:blogger.com,1999:blog-80852718082287733.post-87537546837147758972010-03-18T22:01:00.002+08:002010-03-22T08:55:00.125+08:00The Machines are Breeding<p>I checked out the <a href="http://artifactory.org.au/" target="_blank">Artifactory</a> space in Mt Lawley on Monday night and was really impressed with the enthusiasm of everyone there and the quality of what people are working on. There were a couple of very impressive homebrew CNC machines downstairs and three 3D printers in various stages of completion upstairs including two <a href="http://www.makerbot.com/" target="_blank">MakerBots</a>.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirUH4C-jl6H_NeaRSAUKduKSSxvMUfl7xq7IqlVg8QFrd_KVn5YygdMxCQovNGrlkChEof4sFtj4pfCwanAIq2z5_JmNlT6WZKwg42xPfcRFXS6VAuzn5PPXzsrQsNkrbu9Shj_r43ZNga/s1600-h/DSC_0057%5B4%5D.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="MakerBot" border="0" alt="MakerBot" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Soh3-zkRPBeZW4Oh669Ej0gtf3Kiek8QraW3NWox5Ry1ebE_MKUtiBLqEjKMCuWNnGgfWKDEWknmUz0oksVw_NJiT9YUYF8A2WbBpm8PlUhak1Dp-KUK0PjQlZx4QaK9DEHuSucrZtCM/?imgmax=800" width="244" height="164" /></a>One of the really exciting things being built here is a <a href="http://en.wikipedia.org/wiki/RepRap_Project" target="_blank">RepRap</a> or Replicating Rapid Prototyper. This is essentially a 3D printer that is capable of producing components that can be assembled to make a replica of itself, a concept that is both liberating for makers and incredibly scary at the same time. This ability to rapidly create new and improved generations of 3D printers using the current generation will ensure rapid improvement in this technology over the next few years.</p><p>The 3D printing process is something akin to a hot glue gun being controlled by a robot with 3 axes of movement. A long plastic extrusion (I’m told the plastic is the same stuff as Lego is made from) is fed into a heated extrusion head which squirts a very thin trail of molten plastic in layers to build up a 3D object.</p><p></p><p></p><p></p><p></p><p></p><p></p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOcQAg5A04ndrXGjTsiWigIRysmoEPCGmgZ-6f9WMieFyDdC2bDyM3uIt2khP8aP3qyoApayAkRZcGV9OTx8U0Dr3LYMTzla-0iYR55DRNFSOHdXis65cVptv2poH8afMcCBEJHRMm5yCo/s1600-h/DSC_0058%5B4%5D.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="RepRap" border="0" alt="RepRap" align="left" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb9xM4z6Y3SjtLYvk3TvR6GALlPDZzqbJjFHlrEJjl_g0DO86a34r_ytxXr5h-LLqjSe5ixV0Lu4te818KaFXmR6VSxOlOjuZYFAca7Xkbnlj05jfTmB1RSTJJp6kKe6Zdml0DMjyswAbh/?imgmax=800" width="244" height="164" /></a>The white plastic component pictured here was printed on a 3D printer and is currently mounted on a RepRap that is under construction. The designs for these components are made freely available on the web allowing anyone with the time and inclination to get started on 3D printing.</p><p>One of the most interesting stories I heard at Artifactory was that a 3D printer being used to print a referee whistle – with the pea inside! This design was published on the web and within a very short period of time had been reproduced at several locations around the world. Something very significant to come from this event was the fact that the whistle was printed in places quicker than it could have been shipped there. If this concept was developed sufficiently we would have something approaching teleportation possible for printable objects.</p><p>I will definitely be heading back to Artifactory soon to catch up on what’s been happening with the RepRap and maybe even get my hands dirty with a bit of 3D printing this time.</p>Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-69937402795726194002010-03-17T21:33:00.001+08:002010-03-17T21:33:56.098+08:00Wind Down<p>I went for a windsurf at Scarborough last night and sadly it feels like the season is winding down and we’re heading into that time of year where we have marginal winds and early sunsets.</p> <p>I’ve decided not to mothball my windsurfing gear completely this winter. I’ll try for a sail every few weeks so I don’t go backwards too far before next summer. The swell is much better in winter but the wind can be difficult so I’ll be trying out a few new spots to see how they handle the prevailing onshore storms or early morning easterlies. </p> <p>I’ll probably keep the spots a secret though…</p> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-76233403710438740592010-03-11T21:40:00.001+08:002010-03-11T21:40:56.312+08:00My New Arduino<p>To my horror I recently turned 30. The experience was sweetened significantly by some great and thoughtful gifts, one of these being an <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9284" target="_blank">Arduino Starter Kit</a>.</p> <p>It literally took me fifteen minutes from opening the box to playing a touch sensitive musical instrument that I built using a Softpot in a resistive divider and a magnetic buzzer. I was able to reuse the code from an example that comes with the Arduino environment, just modifying the frequency range I wanted the buzzer to work in. The code from the example Arduino sketch shown below is C and uses some very user friendly libraries for Arduino specific functions.</p> <p><font size="1" face="Century Gothic">/* <br />  Pitch follower <br /> Plays a pitch that changes based on a changing analog input circuit: <br /> * 8-ohm speaker on digital pin 8 <br /> * photoresistor on analog 0 to 5V <br /> * 4.7K resistor on analog 0 to ground <br /> created 21 Jan 2010 <br /> by Tom Igoe <br /></font><a href="http://arduino.cc/en/Tutorial/Tone2"><font size="1" face="Century Gothic">http://arduino.cc/en/Tutorial/Tone2</font></a> <br /><font size="1" face="Century Gothic"> */ </font></p> <p><font size="1" face="Century Gothic">void setup() { <br />  // initialize serial communications (for debugging only): <br />  Serial.begin(9600); <br />} </font></p> <p><font size="1" face="Century Gothic">void loop() { <br />  // read the sensor: <br />  int sensorReading = analogRead(0); <br />  // print the sensor reading so you know its range <br />  Serial.println(sensorReading); <br />  // map the pitch to the range of the analog input. <br />  // change the minimum and maximum input numbers below <br />  // depending on the range your sensor's giving: <br />  int thisPitch = map(sensorReading, 0, 1000, 50, 3000); </font></p> <p><font size="1" face="Century Gothic">  // play the pitch: <br />  tone(8, thisPitch, 10); </font></p> <p><font size="1" face="Century Gothic">}</font></p> <p>The open source nature of the Arduino hardware and software allows amazingly rapid realisation of a project. The hard work done by others previously can be used as customisable building blocks, which can then be shared for use as the building blocks of the next project.</p> <p></p> <p>We live in exciting times!</p> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-11068118524530365202010-03-10T20:44:00.001+08:002010-03-10T20:44:18.735+08:00BabelFish<p>A colleague recently recommended using <a href="http://www.issgroup.com.au/PRODUCTS/BabelFishFoundation/BabelFishFoundationServer/BabelFishPortal/tabid/70/language/en-US/Default.aspx" target="_blank">BabelFish</a> as a data historian after viewing it in action on an oil and gas site.</p> <p>I’ve only had a quick look at the <a href="http://www.issgroup.com.au/PRODUCTS/BabelFishFoundation/BabelFishFoundationServer/BabelFishPortal/tabid/70/language/en-US/Default.aspx" target="_blank">website</a> but based on the features listed here and described to me by the colleague I think BabelFish bears a detailed review, which I will post here if time and trial versions permit.</p> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-38687450585677992592010-03-09T21:00:00.001+08:002010-03-09T21:00:30.814+08:00Pathping Command<p>I’ve just discovered a new windows command line utility called <a href="http://en.wikipedia.org/wiki/PathPing" target="_blank">pathping</a> today. I’m a bit of a purist and hate installing extra utilities to use from the command line so I was happy to see that this one was included with my Windows 7 Professional installation. </p> <p>This command produces something similar to the output from both the ping and tracert commands but if you are prepared to wait for the data collection period it provides statistics of each node based on data collected over that time.</p> <p>This is the output from <em>pathping google.com</em>:</p> <blockquote> <p><font color="#008000" size="1">Tracing route to google.com [66.102.11.104] <br />over a maximum of 30 hops: <br />  0  ######### [192.168.0.5] <br />  1  192.168.0.1 <br />  2  nexthop.wa.iinet.net.au [203.59.14.16] <br />  3  te7-1.per-qv1-bdr1.iinet.net.au [203.215.4.18] <br />  4  gi15-1-1.syd-ult-core1.iinet.net.au [203.215.20.4] <br />  5  as15169.sydney.pipenetworks.com [218.100.2.97] <br />  6  66.249.95.232 <br />  7  64.233.174.242 <br />  8  syd01s01-in-f104.1e100.net [66.102.11.104] </font></p> <p><font color="#008000" size="1">Computing statistics for 200 seconds... <br />            Source to Here   This Node/Link <br />Hop  RTT    Lost/Sent = Pct  Lost/Sent = Pct  Address <br />  0                                           ######### [192.168.0.5] </font></p> <p><font color="#008000" size="1">                                0/ 100 =  0%   | <br />  1    5ms     0/ 100 =  0%     0/ 100 =  0%  192.168.0.1 <br />                                0/ 100 =  0%   | <br />  2   22ms     0/ 100 =  0%     0/ 100 =  0%  nexthop.wa.iinet.net.au [203.59.14 <br />.16] <br />                                0/ 100 =  0%   | <br />  3   20ms     0/ 100 =  0%     0/ 100 =  0%  te7-1.per-qv1-bdr1.iinet.net.au [2 <br />03.215.4.18] <br />                                0/ 100 =  0%   | <br />  4   81ms     1/ 100 =  1%     1/ 100 =  1%  gi15-1-1.syd-ult-core1.iinet.net.a <br />u [203.215.20.4] <br />                                0/ 100 =  0%   | <br />  5   81ms     0/ 100 =  0%     0/ 100 =  0%  as15169.sydney.pipenetworks.com [2 <br />18.100.2.97] <br />                                0/ 100 =  0%   | <br />  6   76ms     0/ 100 =  0%     0/ 100 =  0%  66.249.95.232 <br />                                0/ 100 =  0%   | <br />  7   79ms     0/ 100 =  0%     0/ 100 =  0%  64.233.174.242 <br />                                0/ 100 =  0%   | <br />  8   82ms     0/ 100 =  0%     0/ 100 =  0%  syd01s01-in-f104.1e100.net [66.102 <br />.11.104] </font></p> <p><font color="#008000" size="1">Trace complete. </font></p> </blockquote> <p><font color="#000000">I had to wait 200 seconds for these results but they are pretty comprehensive. The link looks pretty good – only one packet lost on the hop between Perth and Sydney.</font></p> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-52627232204709126812010-02-11T21:44:00.002+08:002010-02-11T21:45:18.380+08:00Flood Gates<p>Things have been crazy busy at work for the last few weeks. My phone has been ringing non stop and there is often a line of people standing next to me with requests. </p><p>When I am in this situation my natural tendency is to hurry to try and get through everything that needs to be done and satisfy the queue of people. My observation this week has been that this is absolutely counterproductive. Hurrying has caused some stupid mistakes on my behalf that I would normally not make. In fact when relating one experience to a good friend who is close enough to be brutally honest he chastised me with “you should know better”. </p><p><img style="display: inline; margin-left: 0px; margin-right: 0px" align="right" src="http://t3.gstatic.com/images?q=tbn:kKFfwvSAF1AtsM:http://ic2.pbase.com/v3/49/485649/1/49976437.pbDSC_2190ecsWeirDamIII.jpg" />So what is the answer? For the next week I will be making a conscious effort to improve my “flood gates”. When work piles up and everyone wants something from me, rather than scramble to compress the time that everything takes to please everyone I need to take a moment to prioritise then let a manageable trickle through the flood gates.</p><p>Engineering is a tricky thing that requires concentration and time, it is not something that should be done when in a rush. I have a queue of people at my desk because people are happy with my work, I can’t then let the pressure of that queue cause the quality of my work to drop.</p>Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com0tag:blogger.com,1999:blog-80852718082287733.post-77171247455222423952010-01-05T21:12:00.001+08:002010-01-05T21:12:07.731+08:00Finished Longboard Repair<p>By the way, that longboard repair I was working on earlier turned out quite well. Here is a quick follow up for Brenden, so far the only confirmed reader of this blog…</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6-kIrTh-_JdcOCIym8KogVaLgfQPoDWCfdaE1GV7HOF8BWpBJfDCGqjNGSn0HvBd9jHIzsVxhDXQ9OVOijHCwMgnniUdCZi5LRTWFpRApmVS39jTPL5JPVp6pLVEoDRsyMMQB3YVzS0hy/s1600-h/2009-08-09%2011.58.19%5B3%5D.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="2009-08-09 11.58.19" border="0" alt="2009-08-09 11.58.19" align="left" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVNmTopVmig3Qp-qy-yMO4Gt7m1g1QWwblv9jDhym7B7j7NBCswefAD9DieGyq2igUA5A44NIUvrJmHf9mprOl2GHny__a1r2k9Mz13vjhBm7qhIKCKvBdQDjvi4ywAi8vGUB2zkueOxRV/?imgmax=800" width="244" height="184" /></a> </p> <p>Once the divinycell repair was cured and sanded back to a smooth uniform surface I masked off the board with newspaper, found some (sort of) matching spray paint from the Repco shop down the road and went to town.</p> <p>After a few previous failures painting surfboards I decided to spray the paint directly onto the foam then glass over the top. I had some concerns that a layer of paint between the foam and the glass would weaken the bond and the end result would have less strength, but it does  looks as though this is what is typically done in surfboard construction. This might be a good argument for buying unpainted boards though….</p> <p>After spraying a number of very thin coats of paint, in fact heaps of white coats of paint to cover up the dark coloured divinycell, I applied resin and a couple of layers of glass. After squeegeeing out the excess resin I left what looked like a very neat repair to cure. But when I came back to my horror there was a large air bubble. It seems that there was a small void somewhere in the divinycell which heated up during curing and blew a bubble under my glass. Arggghhh!</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWHzOnjblw9vYaKTRC5e6x7evC46koaE_tEso0h8k28OpUhojjVllpJgjk9XjjcYu_Y5f5AbkUdpM55CXQSEaGKYKx4tRNfNnYknrsyWdCgpCplc7eue2fKy-4D3JnBgq5w15nt5rmVGsj/s1600-h/2009-09-18%2016.10.27%5B3%5D.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="2009-09-18 16.10.27" border="0" alt="2009-09-18 16.10.27" align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs2Y7Ftw67q9mvJvjPc6lj9a4so-544nRLjVTrnNrFiG9HGqhG0NAO6an8dWE2ZjPbSADErXiXKoAhuhQ57sGQgsLlp8eTyJBnmXnTxwcoxDZngrK6A_wYEd_kmNGFeh8-I18B_ip9upiC/?imgmax=800" width="244" height="184" /></a>So, next step was to drill a couple of small holes in and around the bubble then syringe in a brilliant two part expanding urethane foam I have in the shed. About 20ml of mixed foam completely filled the hole plus about 2 litres of whatever buckets I could find to contain it! After curing, I sanded back and applied another glass and resin patch to my glass and resin patch. </p> <p>So after sanding this final patch back with increasingly fine grades of wet and dry sandpaper I have the fairly pleasing result shown here. Not as neat as I would have liked, but not too bad considering!</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:734397e2-5bc9-4a21-b89d-ce928860b0fa" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Fibreglass" rel="tag">Fibreglass</a>,<a href="http://technorati.com/tags/surfboard" rel="tag">surfboard</a>,<a href="http://technorati.com/tags/diy" rel="tag">diy</a>,<a href="http://technorati.com/tags/repair" rel="tag">repair</a>,<a href="http://technorati.com/tags/divinycell" rel="tag">divinycell</a>,<a href="http://technorati.com/tags/foam" rel="tag">foam</a></div> Ben Caldwellhttp://www.blogger.com/profile/12302040031314588676noreply@blogger.com1