The Belief Manifesto
How to trust your conviction that you can then follow vehemently.
Till now,
1. Success of someone else with similar beliefs.
2. Trusting your own past success.
Believing convictions others have championed leads to inflexibility to correct them en-route. The game changes when circumstances change. A different time is a different circumstance. A different person is a different circumstance.
You have already established that since the other individual succeeded with this, its going to work for sure. There is no sense of vulnerability.
Be vulnerable.
In the beginner’s mind there are many possibilities, in the expert’s mind there are few.
Strong convictions loosely held.
Using an LED Matrix Module
The LED Matrix Module allows you to add a nice display to your project.

Lets talk about this display first. It is a matrix of 8x8 Red LEDs with all their anodes connected together. So the anodes of each column of LED are given as 8 pins. And the cathodes of each row are given as 8 pins.

Hence we have a total of 16 pins on this display. Now, as you might guess, a single configuration of these pins cannot uniquely assign a value to each of the 64 LEDs on the display. Hence we multiplex this information. We display column by column, and we do it so fast, that it appears as one image on the matrix to our eyes.
Now if we were to connect these 16 pins to an Arduino, that would be a lot of connections and it would leave us without any extra pins for other purposes.

It is from this that we got the idea to fabricate our very first PCB. It consists of an IC called a Serial to Parallel Shift Register. It is a register, into which you can shift 8 bits of data serially, and these will then show up on 8 pins of the IC. Hence we use two of these for each of the set of 8 pins of the matrix.

Once soldered it looks like this. Note the use of tiny SMD current limiting resistors. They are slightly difficult to solder, but give great space savings. All the components hide underneath the LED matrix like this:

The display is also soldered onto the board, so that there are no loose parts.

Hence we now have to deal with only 6 pins. The two ICs are connected serially, so to control the 16 pins of the display, we need to shift in 2 bytes every time. These pins are:

The VCC line expects 5V supply and the GND is connected to the same on Arduino. CLK, DATA and LATCH are the lines that handle the serial transfer. At each CLK, the DATA line is read, and in this was a bit is transferred into the shift register. After sending a complete byte of 8 bits, we toggle the LATCH signal once which transfers the data in the shift register to the outputs.

Start by connecting jumper wires to the display and the Arduino Uno.

Connect CLK to pin 13, DATA to pin 11 and LATCH to pin 10. ENABLE is an active low pin, which means that to enable the display we need to ground this pin.
Now launch the Arduino IDE and paste the code: Feemo Matrix Adapter Sample Code.

Load the code to the Arduino and you should see a string of text scrolling on the display. Congrats!
byte displayBuffer[8]= {0};
The current configuration of the display is stored in this buffer space. It is 9 bytes (one extra byte outside the edge of the screen to fix a bug). Hence 8 of the bytes correspond to the entire screen. Each byte is one column on the display.
The real magic of the code is this part below. It takes the contents of the buffer above and writes them to the display very quickly so that it appear that the whole buffer is on the matrix, even though actually it is displaying the data column by column.
void drawImage(byte * matrix) {
//For each column,
for(int i=0; i<8; i++) {
//Send the data of the columns.
for(int j=0; j<8; j++) {
digitalWrite(clockPin, LOW);
digitalWrite(dataPin, (matrix[i]) & (1<<j) );
digitalWrite(clockPin, HIGH);
}
// Select column by column.
for(int j=7; j>=0; j--) {
digitalWrite(clockPin, LOW);
digitalWrite(dataPin, (~(1<<i)) & (1<<j) );
digitalWrite(clockPin, HIGH);
}
// Latch the data to the output pins of the IC.
digitalWrite(latchPin,LOW);
digitalWrite(latchPin,HIGH);
}
}
Hence in this way the entire buffer is drawn to screen. The rest of the code is interplay to draw the text to this buffer. It consists of a font library that specifies what each character looks like in a 8x5 matrix. Hence 5 bytes are required to denote each character.
Hence you will get an output as shown in the video below. (Video was shot when the adapter board was prototyped.)
Scrolling LED Matrix for Arduino from Param Aggarwal on Vimeo.
So now quickly incorporate this amazing display into your project!
Parts used in this tutorial:
Building a WiFi Twitter Display: Scrolling Tweets
In the previous post - Combining multiple LED matrix modules we explored the use of three LED matrix displays to show scrolling text.
But the text was pre-programmed in the code, and hence was not of much utility. By connecting the device to the internet, we can get interesting and meaningful content to display on the device. For this purpose, I connected a Sparkfun WiFly Shield on top of the Arduino Uno.

This simple shield allows connectivity to the internet using WiFi. Let us first test the WiFi Shield to learn how to use it.
The above code is the sample code that uses the WiFly Library to connect to Google’s Homepage and return the raw HTML in the Arduino Terminal.
Once you get it working, try fiddling with it to understand how it works.
Now to read data from a Twitter account, we need to use the Twitter API. To do this, we write a simple Node.js application, and host it somewhere like Heroku.
The URL we call is
http://api.twitter.com/statuses/user_timeline.json?screen_name=verge&count=5;&trim_user=1
Here we are telling the API, to return the last five tweets of the user @verge and trim extra information. The response is in JSON format. To extract it, we need to do some string manipulation on the code.
Here is the Node.js code running on Heroku: Node.js code snippet on Github and the result is the following: simpletwitter.herokuapp.com
As you can see, we take the complex JSON response from Twitter, and parse it into a simple list of five strings. To see the real Twitter JSON response, use the command line utility curl.
Now that we have a webpage that can give us text to display, we connect to this Heroku app using the WiFi Shield, and scrape out five strings. Then its really easy to just send these strings to the display like in the previous code.
The combination of three LED matrix displays give us 24x8 LEDs bringing the total LED count to 192. Yes we are controlling 192 LEDs using just one Arduino!
The buffer that stores this is:
byte displayBuffer[24]= {0};
which is a simple buffer of size 25 bytes. Each byte is 8 bits, and each bit corresponds to one column of 8 LEDs on the displays.
Here is the entire code for this setup:
Scrolling Tweets using multiple LED matrix displays code on Github
Finally we get this:
Building a WiFi Twitter Display: Scrolling Tweets from Param Aggarwal on Vimeo.
Finally to make the project completely wireless, we use a Sparkfun LiPower Shield and accompanying LiPoly battery.
Congrats on building a network connected device of the future!
Parts used in this tutorial:
Combining multiple LED matrix modules
This post uses a few LED Matrix Modules, that allow you to easily connect 8x8 LED Matrix displays to your Arduino.

In a previous post, you saw how easy it is to connect one of these to an Arduino and draw to the Matrix from a buffer.

Now in this post we will take things further, and use three LED matrices to form a long display of 24x8 which is great for displaying scrolling text.

Now each adapter has six pins. The first two are VCC (5V) and GND. Next come the CLK, DATA, LATCH and ENABLE pins. To connect three of these together, we can connect all the pins together into one pin on the Arduino except the DATA pin.

I used a breadboard with some male header pins to do this. Also, jumper wires work great for quickly making connections.

Next, the common VCC line is connected to 5V on the Arduino, and the ENABLE and GND lines to GND pins on the Arduino.
The ENABLE line is active low, hence to enable the displays, we need to give a low of 0V on this line.
The CLK line is connected on pin 12, latch on pin 11 and the three data pins from the three displays to pin 7, 6 and 5.

Thats it, the connections are done. It’s that easy. Now to proceed to the Arduino code.
First we will start with just displaying the buffer on the 24x8 screen. The below code should work easily, if all the connections are correct.
Basically we initialise a 24 byte matrix with each byte corresponding to a column on the display. Then we multiplex through the columns to display the entire buffer on the displays.

If you got it working, then congrats! We can quickly move to displaying text on the display now!
Have a look at this code, and try running it to get scrolling text on the displays! Code for Scrolling Text.

This is how the scrolling text looks like!
Parts used in this tutorial:
Jeff Bezos: A Review.
Amazon launched the new line of Kindle reading devices and Kindle Fire tablets yesterday. It was a great unveiling: product demos, ship dates and unbelievable pricing. Gruber is impressed.
Though much has improved with the devices, I think we are seeing a bigger change with Jeff Bezos and his company: Amazon. When I saw him on stage, he seemed more mature, more intense that I have ever seen him before. Fighting to build a great service and leave behind a lasting company.


The keynote reminded me of someone else: Steve Jobs and his company: Apple. He has been a great inspiration to every builder and hacker of this generation; dreaming to put a dent in the universe as he would call it.
At first notice, it looks like a blatant rip-off of his style. Telling a story about the product. Making the case for the device. The clean and simple stage with a black background. Inspiring product videos. Even talking about where a product fits in with their strategy.
But looking deeper, it is an acknowledgement. True inspiration. Each and every aspect of the Amazon Kindle keynote was a tribute to Steve Jobs and his presentation style.

Pointing out the tiny details about the device, that might go unnoticed. Making it clear how much love has been poured into the device. Building up the hype over what the product can do and then dramatically unveiling the low price. Emphasing the values of the company towards the end. It all goes down to say one thing, Jeff bezos wants to build his own legacy.


This is a man who has been inspired so deeply, that it shows. Steve took Apple from two guys in his parents garage, to the most valuable company on the planet. I think Bezos is thinking no smaller.


Kudos to Jeff for the amazing company he is building with Amazon.
Kudos to Steve for inspiring an entire generation.
Taste
Taste is preference. A like and dislike.
Taste is crucial. It defines you.
Love some things, hate others.
It is about having opinions. Strong beliefs that you fight for. To take a stand.
Go ahead. Like and dislike. Ignore others, their tastes are different.
People without taste are boring. They are ok with everything. They are character-less. They just live along trying to please everybody. What defines them?
Express your opinion. Stick with it. Be tasteful.
Selling Shampoo Online is Hard
Currently there are two ways of buying shampoo and other daily-use products:
Walk up to your local general store and name the product you wish to buy. He will go in and get it for you. You see it and immediately know it is what you want.
Drive to a large shopping centre and walk around with your cart. Whenever you visually recognise something you want, just drop it into your shopping cart.
Now, we have to agree that the first method is less convenient and the second method is more convenient in terms of thinking of a product and letting the world know you wish to buy it. Unfortunately today, online buying is at one end of this spectrum; the less convenient end.
It is far worse than your local store, because instead of just speaking the name of the product you have to type it in correctly into a search box, then skim through the options that come up. Also, this is not a visual process because of the tiny thumbnails.
Recently I had to buy a shampoo, and I opened up Flipkart to buy it. I typed in the name, and got the wrong spelling. I tried again and got a list of search results. Now came the hard part, I had to decide whether I wanted the 400ml one or 200ml one. In a shop, I would glance at the size of the package and pick one easily. Here, the images showed the respective packages at the same size.
Once I added that to my virtual shopping cart, I proceeded to add shaving accessories. Soon, I gave up. Next time I was in a shopping centre, I spotted it and remembered I had to get one. I swiftly dropped two of them into the shopping cart.
That is a win for the old way of doing things. Definitely something is wrong.
Guess what, the online store has something that the physical store doesn’t. It knows who I am and my purchase history just as I have entered the store (opened to website). Shampoo is something we need to buy every month, and most likely it is the same as the one bought last month.
It would be so much better if after purchasing a product online I could add it to a list, a monthly shopping list. Slowly, it would contain the items I always buy at the mall every month.
Now suddenly the act of buying these items has fallen on the easier side of the above spectrum. It’s super convenient. Every month, I go online, click buy all on my monthly shopping list, and add or remove a few items, if needed. A monthly purchase of a thousand rupees from Flipkart. That is enough incentive for a such a system to be in place.
A concept that fell on the difficult end of the shopping experience has now been switched over to the easier side. A win for the new way of doing things - buying online.
And one more thing. I no longer need to lug those heavy and huge shopping bags home from the mall!
Open Letter to Flipkart - Doing eBooks Better Than Amazon
Amazon’s recent venture in India, was entering the market with Kindle eBooks. This is it’s only presence in India. On the other hand Flipkart, a sort-of Amazon clone for India is catering to the needs of Indian citizens each and every day. They sell physical books, movies, televisions, ovens, shampoos and the quintessential baby diapers.
If, and ever, Flipkart decides to launch something similar to the Kindle, I would like to offer my two cents on how it could be done differently.
Act I:
It isn’t better.
Ebooks cost in the range of Rs 400 to 500 for the books I was interested in buying. Paperback versions in India cost the same. I have been inclined towards the paperback as it offers me far more value. There is no improvement to my experience that might make me switch my method of reading.
Some promotional items are available at Rs 100, but that is like using a special coupon, and is not the state of their entire offering. On the other hand, paperbacks are DRM free and I like to pass on books I read to my friends.
To get me to switch, I should either get something cheaper, or it should offer me more value for the same price.
Act II:
Making it better.
Ebooks are digital, they can be with me everywhere. Books that would have no luck getting printed, can make a shot with digital publishing. Also, ebooks have the potential to be part of the ‘social graph’.
I would like to offer my suggestions for the same.
Cut a deal to be able to sell ebooks cheaper than their Indian paperback counterparts, for the promise of higher volume of sales. (I was pleasantly surprised by the Rs. 15 pricing that Flipkart brought to the Indian market for songs. Its the right mark.) Market them right along the paperback counterparts with the percentage savings in bold.
Offer sharing unheard of in the paperback world. Let me select a block of text and share it to my favourite social networks, with a link back to purchasing the book. Also, let me gift copies to my friends easily, like Apple’s app gifting works. Just a text box with emails comma-separated to gift to. Also sync read position between devices.
Become the publisher. What I suggest here is pretty much Amazon Singles. But they haven’t thought big enough. This is India! Let people self publish books in any language for under Rs. 100. Keep 30%, and let them keep the rights. The quantity of content relevant to India that Flipkart would have would out rival anything Amazon can ever dream. Next, ebooks that sell well, can then be printed for guaranteed sales. Flipkart’s USP.
After all Flipkart is an Indian company, and Amazon is not. The post independence sentiment still lives.