Tuesday 26 June 2012

RasPi versus Arduino

Arduino Costs

I was looking for an Arduino Uno prior to my RasPi purchase and found several Canadian suppliers. One such supplier (http://www.canakit.com) has the Arduino priced at $29. However, after taxes and shipping using standard mail ($12.95) we are up to $48.47. With express mail we add on $29 for a total price of $66.61, almost the cost of my RasPi!

My local dealer also has the Arduino Uno which I can buy directly in-store, however the cost is still in the $40 range no matter how you cut it. I guess they all must pay a shipping fee and import tax, so by the time it is offered for sale at your local electronics shop it will be in that range too.

RasPi or Arduino?

One of the advantages of the Arduino is the extremely low power usage, and also once it is programmed it can be turned on and off and simply resume the program very quickly. The Raspberry Pi uses more power, has to boot the entire OS (which could take a minute) and you would need to configure a boot script to automatically load the program you wish to run, in case of power failure. Otherwise it would just load up to the desktop or Linux terminal and sit there waiting for input. 

On the other hand, for only a few bucks more ($20 let's say, after all taxes/duties/shipping) you get a fully-functioning computer with the RasPi that you can interact with and program directly. It also has ethernet built-in so you can theoretically create a program that could also send messages to (and receive) from the internet. Arduino can do that but only with an add-on ethernet board. Your RasPi can also power a display, unlike the Arduino which also requires an add-on video board.

Truth is, they are different animals and can compliment each other. However, for the small difference in price the RasPi seems to offer way more functionality yet still give hackers the option to use the GPIO to perform some interesting tricks. 


My RasPi has arrived

Shipped Raspberry Pi 

My Raspberry Pi finally has arrived! It was actually in the country almost 1 week ago, but then by the time it passed through customs and spent a few days not being delivered by DHL (somehow they couldn't find my office even though I was open).... I had missed a weekend of RasPi hacking opportunity, it finally showed up on my door on Monday. 

I plugged in my already-prepared SD card with Debian OS and it booted no problem! Worked perfectly with my wireless keyboard/mouse, HDMI, ethernet internet connection picked up, and I was out of the starting gate running!

Cost breakdown

So the final cost of the RasPi came down to the following, just in case some of you people out there are interested. Unfortunately the cost (although still cheap) almost doubles due to the stupid governments and shipping agents involved along the way from the UK and your hacking hands. Here's how it unfolded:

   $35.00  RASPBERRY PI
   $ 8.02  RA SHIPPING
   --------------------
   $43.02  TOTAL ($US)


Once it entered the country, added another $18.60 by Canada Customs ($7.30) and DHL ($11.30)...


   $45.39  TOTAL CONVERTED ($US -> $CAN)
   $ 2.81  ELECTRONIC MODULE GST
   $ 4.49  PROVINCIAL SALES TAX ON IMPORT
   $10.00  DHL PROCESSING FEE
   $ 1.30  DHL GST ON PROCESSING FEE
   --------------------------------------
   $63.99  TOTAL ($CAN)


While I believe it is still a worthwhile purchase for a useful computer, people seem to forget that even the cheapest devices will still have at least $20-30 added on to them (if not more) for duty and shipping, especially coming from Europe which has no free-trade agreement with Canada. 

Thursday 14 June 2012

Implementing an RSS Reader App

Implementing an RSS Reader App

So here starts my journey into implementing a client-side RSS newsreader into my HTML5/CSS/Javascript apps. I found some samples on the web. I want to add RSS feeds functionality to my Playbook app so that I can have content that is continuously updated via the web. To do this, I need code that will essentially seek out and download (in the proper formatting) the blog articles.

Essentially, I can make an app for the tablet/phone which is hard-coded to grab articles and display them from a blog. I can update my blog and the app will also update what it shows.Professional articles and news-bites from journals can now be turned into an app. Cool!