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.

Thursday, October 27, 2011

Mobile Application Development

Quest of developing mobile phones got to me as well. With 140,000 application in the Apple appstore and similar number of apps in android store, I was fascinated to realize that sooner or later our phones will be the most powerful device that we will own.

I started in this journey to develop my first application on a iOS or android device. Being a developer already with 17 years of development experience under by belt made me wonder, do i learn a new programming language another platform. How do i go about developing new application for these new devices.

Here is the infrastructure needed to develop for these devices

iOS
  1. Need a MAC computer with OSX (Snow Leopard or Lion) . -- Cost $800 - $1200 approx.
  2. Registration to the Apple developer program -- Cost $99/year
Android
  1. PC with atleast 4 Gb or RAM (2Gb works will be too slow) -- Cost $300 - $800
  2. Operating system is more flexible here. Any Java compatible OS (windows, Linux, OSX, Ubuntu, Solaris, etc.)
  3. Registration to Android market

That costs a ton of money if i want to develop applications in both iOS and Android. For someone with serious product vision and ROI planning, this amount may seem miniscule. But for a hobby developer who is starting from scratch it costs a ton. Dont get disappointed just yet. There are other ways you can go about this.

Introducing Hackintosh
You could use a PC dual boot it to have Windows 7 or XP on one partition and MAC on the other. Although, according to Apple it is not legal to install OSX on non Apple hardware.

More Options
If you possess a intel based PC and the processor is capable of VT (virtual technology). You will not need to install OSX instead run it using VMWare or Virtual Box.

Tools
Traditionally for iOS development, programmers would need to use XCode and program using objective-C. Another new language to learn and adopt.

Android developers need to know Java (which is quite common) and use Eclipse IDE along with Android tool kit.

New Tools (Popular ones)

Titanium - Appcelerator - Javascript based development platform. Javascript being one of the widely used web development scripting language. Titanium API are integrated into well known Aptana IDE. Titanium based application provides native look for the application.

Requires: iOS SDK for iOS development, andriod SDK for android development.
Website: www.appcelerator.com
Cost : Free, starting from $49/month and more


Phone Gap - Javascript based library. Can be used used on OSX along with XCode and Eclipse on PC. Phone Gap library can be used to develop application on various platforms eg:- iOS, Android, Palm, Symbion, Web OS. One draw back on Phone Gap is the apps developed do not have a native look.

Requires: iOS SDK for iOS development, andriod SDK for android development.
Website: www.phonegap.com
Cost : Free


More to come on tools, tips, tricks and samples