Tuesday, April 1, 2014

Multi OS boot for Raspberry Pi


The hard disk drive for the Raspberry Pi is the SD card.  There are many ways to put an OS (operating system) image on the SD card.  I usually prefer to boot my raspberry pi with options to switch different OS. Instead of assigning a new SD card for a OS, I would like to put a few of them on one SD card.

Berry Boot - It has been out there the longest.  It's very easy to install new operating systems on your Pi. You can chose one OS as your default and others will be displayed booting.  Berry Boot site has more instruction on how to install it.
http://www.berryterminal.com/doku.php/berryboot


NOOBS - New Out Of the Box Software - Pi foundation with the authors of Berry Boot put together NOOBS.   It is very similar to Berry Boot for the user, internal implementations have a few changes.  You can download NOOBS from here http://www.raspberrypi.org/downloads.  I found the install tutorials here to be useful https://github.com/raspberrypi/noobs

Berry Boot is my choice of OS loader.  As you learn Linux and choices of OS, you will want to try new OS on the Pi.   NOOBS or Berry Boot's offers a lot of operating systems to choose from.  If you ever want to install an OS that is not listed on either, both loaders will allow you to install it from the image.  Its not very easy for a beginner, but its not too hard.  There is some complexities involved.  You will need to learn some Linux commands to navigate yourself.

How to install custom OS on Berry Boot -  I installed pwnpi from pwnpi.net (penetration testing tool).  You can learn a ton about web security wired or wireless using this. Here is an awesome tutorial to add and boot a custom OS downloaded (not included in berryboot list of OS)



How to install custom OS on NOOBS - I have not used NOOBS, but know of a few folks who did.  It also involves some complexities. Here is the link to that https://github.com/raspberrypi/noobs .  Just scroll down till you find the advanced usage section.

Enjoy your Pi.  Feel free to shoot any questions.

Monday, March 31, 2014

Raspberry Pi - $35 Wonder


Raspberry Pi - $35 wonder



I came across this gadget over a year ago.  You will find the descriptions of this wonderful gadget all over the web.  There are tons of youtube channels like https://www.youtube.com/user/RaspberryPiBeginners that will show you possibilities of this device.

Total Cost :- $60 approx.

  1. Raspberry Pi - $35
  2. Power Source  - $5 - eBay  (Android Phone Charger will do)
  3. SD Card (2Gb) - $5 - eBay (Any camera one will do)
  4. HDMI or RGA cable - $10 on Amazon 
  5. USB Keyboard & Mouse - $5 - eBay (use one lying around from your computer)


It is not a replacement for your laptop or home PC.  What is all this hype about Raspberry Pi?  The device was mainly built for kids to learn programming in parts of the world where they could not afford a expensive computer.  Powerful applications are possible using this small little wonder gadget.  I built a few things listed below,


  • GPIO Ports -   Raspberry Pi provides you access to control external devices connected to it.  This means you can control a light bulb, garage door, video camera, quad coptor, r/c car and so many more.  I played around building a remote garage door opener.

  • Media Center - Stream HD quality movies online directly into your TV.  Yes! Chromecast can do the same.  Stream videos from your iPad, iPhone or iPod directly into your TV without wires. Yes, chromecast can do that too.  You can watch almost anything that plays on your comptuer on the Pi.  Use either of the following 

  • Linux Desktop - There are several images out there that you can install on your Pi.  Rasbian Wheezy is a simple light weight desktop and official choice of Raspberry Pi foundation.  I used this one.  Using linux you can build limitless things.  Some I built are,
    • Scratch - Visual programming for Kids.  Built by MIT
    • Web Server - To serve webpages
    • Live web camera stream - Stream live video
    • Time Lapse (stop motion) videos
    • Home Automation 
    • Node JS server - Harness the power of Node JS.  Create simple webservices.


Over next few weeks and months, I will put my pet projects on Raspberry Pi here.    Feel free to comment or ask questions if I may help.

Friday, September 21, 2012

Building my own SIRI

I was working on a mobile app for both android and iOS using titanium.  Found two interesting things.  Apple does not allow developer community access to SIRI and my phones do not have SIRI (iPhone 4).  But I want my app to be voice enabled.  How can I do this ?  Is this even possible?

Answer is Yes.  its possible.  Here is my approach.  If there is any interest I can share the code.

My requirement:

  1. App should be able to talk to user
  2. User should be able to respond specific commands by voice.
  3. App should be able to respond with action or error voice.


In my case i want get the user input via Voice like numbers.

Voice Synthesis (Talk your text to user)

  • I wanted the app to ask the user for inputs. Keeping it dynamic.
  • I used google to synthesize the voice
    • http://translate.google.com/translate_tts?tl=en&q=text”
    • You send the question in text field of the above url, you will recieve a wav file back.
  • Use Ti.Media to play back the way file. Note: Ti.Media does not work for android.  Need to use third party module.

Voice Recognition

  • Use Ti.Media to get the input from speaker from user.  Note:  Android will have to use a thrid party module.
  • Record the wav file.  I recorded it as 8KHz file to keep the wav file small.
  • Send to to a conversion service online.  There are many services available online to accomplish this task.
  • I used this site http://api.ispeech.org/api/json which converts the voice to text.

Error Handling

  • When the text is returned from recognition call.  My call back will analyse if the data recieved is relevent.  There is confidence level also returned.  Based on confidence level and data recieved, I make decision to use the text or play back a custom error message.
  • For example:  I ask to enter numbers.  The translated text has alpha, then i play back a message that i expected only numbers.
Observation was that over 3G the recognition service was slow.  On LTE and WiFi it worked almost like SIRI.  But I used a non paid service.  Using google translate and voice you can have the app speak different languages too.  I tried using the codebox module for android got stuck, now am writing my own.

Any thoughts welcome.

Tuesday, September 18, 2012

Innovation Buzz

There is a lot of buzz these days about innovation.  Everyone wants to innovate.  Everyone wants a piece of it.  How can we be Innovators ?  I saw Pranav Mistry's Sixth Sense project video a while ago.  It was an out of the box thought.  But if you looked closely, Pranav used what was at his disposal and gave life to an idea of gesture based system.  Sometimes we forget that innovation is not always the next FaceBook or Apple. We forget that assembling what is available for a different purpose is also innovation.

I attended a session on Medici Effect by Frans Johansson a while ago.   It was an awesome experience. Frans was mainly talking about finding intersection.  Intersection of different thoughts of life.  Frans was telling all of us, it's about the number of ideas you have.  More the ideas,  better the outcome.  Some ideas will die and some will make more sense to move forward.  If you have not read Medici Effect by Frans, I would highly recommend it.




Tuesday, September 4, 2012

Mobile App development tutorial

Titanium Development

Here are some links that were quite helpful.

Drilldown navigation tutorial
http://mobile.tutsplus.com/tutorials/appcelerator/drilldown-navigation-with-titanium/

SQL Lite - Database driven tables
http://mobile.tutsplus.com/tutorials/appcelerator/titanium-mobile-database-driven-tables-with-sqlite/

Videos on tips and tricks of Titanium
http://vimeopro.com/appcelerator/forging-titanium

Charts in Titanium - Raphael JS, D3JS
http://boydlee.com/appcelerator-titanium/creating-charts-for-titanium-using-raphael-js.html

I have been able to use d3 successfully.

Tip: Ensure you rename the other java libraries to .lib instead of .js

let me know if you have any specific issues you need some advice on.

Funding your ideas

Well,  all of us are passionate about our ideas and thoughts.  One of us could have the idea for the next face book or google.  But, how can we take our idea further into making a tangible product or prototype ?  Now comes lots of questions.

Is it just funding my idea ?  What about the skill set that i need to get it accomplished ?  What about infrastructure ?  Hmmmm as I start thinking the list grows.   As am passionate about my ideas,  I dont want to let them die just yet.

Here is what i will do.  Make a list of what it takes and put a price tag around it.  Now I know tentatively what i need and money i need to raise.  Get ready to market the idea.

Create a power point presentation  
1.  Why my idea ?
2.  What does it do ?
3.  Why should you buy it ?
4.  Does it solve world peace ?  I guess not.

Create a 3 minute video about your idea and include a proto type if there is one.  We have a way to showcase it to the rest of the world.


Crowd source the funding for your project.  Create different tiers of support for your sourcing.  No amount is small amount.  Do not think $1 is small.  Ocean was created with droplets of water.  Have a strategy for these tiers.  Here is a sample.

$1 Tier -   Will get a Thank You note
$5 Tier -   Will get your name as bronze sponsor on our site
$15 Tier - Will give you a T-Shirt with our logo
$25 Tier -  Will get the app this idea is all about for free without any ads along with support and free updates
$50 Tier  - You get the idea.

Go to http://www.kickstarter.com/  and create your kickstarter.


All the best.

Monday, September 3, 2012

Mobile development Native vs Webcontainer vs hosted

I got my hands around developing a few mobile apps.  I will put my thoughts here.  It all depends what you plan to do.  What features do you need for your app?  The last one I worked on needed OCR (image recognition).  I was developing for both iPhone and android.

When you need to access the hardware, hands down native offers lot of tools. Titanium has ways to plugin native libraries into th app.  I did try both native and titanium.  I am happy camper for both of those.   But phone gap surprised me as well,  I found a way to write plugin for native libraries using phone gap.  My only soap box on phone gap is, I don't like performance of JQ touch yet.  The is lot of room for improvement.  

If your app is a simple one,  that uses simple device features like camera and geo location.  You could do with a webcontainer (Phone Gap + JQTouch/Sencha Touch).    But, I still have not found a web library (open source ) that does good job for UI.  Sencha touch does a good job for web container UI but, it's not free.  It's gpl v3 license.  Sencha touch costs about $199 for now.  Not too bad.  Combination of Sencha Touch, HTML5 and Phone Gap could give you a decent mobile app.

Hosted apps, for now are too slow.  With bandwidth becoming premium,  I'd stic to native for UI and hosted svcs for data.  REST based services to retrieve data from server. 

So for now, am sticking with free version of Titanium.  The main reason being, that i can develop both Android and iPhone apps from the same code base.  However, their supported version costs an atrocious $7500 which is too heavy for an entry developer.  Adobe's flash builder is also capable of delivering native apps.  My next task is to take a look at flash ( I know flash is dying).

BTW,  Phone Gap is now owned by Adobe.  Adobe donates Flash to apache open source foundation.  

Please share your thoughts.