# Chitto Jetha Bhayshunyo(Where mind is without fears)

Chitto Jetha Bhayshunyo
—————————————–

Where the mind is without fear and the head is held high,
Where knowledge is free,
Where the world has not been broken up into fragments, by narrow domestic walls, Where words come out from the depth of truth,
Where tireless striving stretches its arms towards perfection,
Where the clear stream of reason has not lost its way, Into the dreary desert sand of dead habit,
Where the mind is led forward by thee , Into ever-widening thought and action,
Into that heaven of freedom, my Father, let my country awake.

– Rabindranath Tagore.

This poem is part of the Nobel prize winning literature ‘Gitanjali‘ written by my countryman Rabindranath Thakur (anglicized as Tagore) who was the first non-European to win a Nobel award for literature. Some of the selected poems of Gitanjali can be found here.

Advertisements

# An RGB Experiment

So.. Now that I have completed the XOR Simulation exercise and understood a bit about I/O on the Arduino board, I am all set to connect and light up an RGB LED. A simple setup it shall be. I will have three push buttons in pull down configuration (that means, when they are not pressed they are grounded — logical 0) and each corresponding to one of the RGB colour. So when the first button is pressed, it shall make the RGB LED glow Red, the second one shall make it glow blue and the third shall make it glow green. Also, if you were to press two of the buttons simultaneously, then both the corresponding colours should glow up(Hey, After all..its a RGB LED.. What fun without some colour combinations!).

Before we go into the circuit setup, lets understand the pin combinations of a 4 pin RGB LED. A normal 4 pin RGB LED’s come in two categories based on their pin combination. One being the common anode and the second being the common cathode. I guess in most of the cases, you will have with you a common cathode RGB LED and so let’s understand the pin markup of a common cathode RGB LED. It is as shown below :

And here is the circuit setup :

Below, is the code required to achieve the functionality as explained above

```/* RGB Experiment - Blinking colors with RGB LED and three push
* buttons.

* Arduino shall detect the button press and shall make the RGB
* LED blink the corresponding colours. If two buttons are pressed
* together, then both the corresponding colours shall light up.
* But in case all three button are pressed together or all three
* are release, the RGB LED will be in off state.

created 31 Mar 2013
by Rajgopal Menon<rajgopalmenon.wordpress.com>
*/

//Declaring all constant values. These don't change
const int buttonPin1 = 2;
const int buttonPin2 = 3;
const int buttonPin3 = 4;
const int ledR = 9;
const int ledB = 10;
const int ledG = 11;

//Declaring all variable. These shall change during runtime
int buttonState1 = 0;
int buttonState2 = 0;
int buttonState3 = 0;

void setup() {
//Setting the output to the RGB LED's
pinMode(ledR, OUTPUT);
pinMode(ledG, OUTPUT);
pinMode(ledB, OUTPUT);
//Setting the input ports through which button
//press is detected.
pinMode(buttonPin1,INPUT);
pinMode(buttonPin2,INPUT);
pinMode(buttonPin3,INPUT);

}

void loop() {
//Reads the button values
buttonState1 = digitalRead(buttonPin1);
buttonState2 = digitalRead(buttonPin2);
buttonState3 = digitalRead(buttonPin3);

//Executes the switching on and off of LED based on condtions.
//If two buttons are pressed, an analog write is done where the
//colours corresponding to the pressed buttons are give 2.49V each.
if(buttonState1 == HIGH && buttonState2 == LOW && buttonState3 == LOW){
digitalWrite(ledR, HIGH);
digitalWrite(ledB, LOW);
digitalWrite(ledG, LOW);
}
else if(buttonState2 == HIGH && buttonState1 == LOW && buttonState3 == LOW){
digitalWrite(ledG,LOW);
digitalWrite(ledR, LOW);
digitalWrite(ledB, HIGH);
}
else if(buttonState3 == HIGH && buttonState2== LOW && buttonState1 == LOW){
digitalWrite(ledB,LOW);
digitalWrite(ledR, LOW);
digitalWrite(ledG, HIGH);
}
else if(buttonState1 == HIGH && buttonState2 == HIGH && buttonState3 == LOW){
analogWrite(ledR,127);
analogWrite(ledB,127);
analogWrite(ledG,1);
}
else if(buttonState1 == HIGH && buttonState2 == LOW && buttonState3 == HIGH){
analogWrite(ledR,127);
analogWrite(ledB,1);
analogWrite(ledG,127);
}
else if(buttonState1 == LOW && buttonState2 == HIGH && buttonState3 == HIGH){
analogWrite(ledR,1);
analogWrite(ledB,127);
analogWrite(ledG,127);
}
else {
digitalWrite(ledB,LOW);
digitalWrite(ledR, LOW);
digitalWrite(ledG, LOW);
}

}
```

Hmm.. I see that my code has a big if-else-if snake. Currently I am unaware of a technique to write cleaner code for my sketches as I am just a beginner.  I will have to read more and learn more to make this code look better. But for now this is the way it is. I am open to views of anyone who has better experience in correcting this particular issue in the above code…or is it the way it is supposed to be?

# My Arduino UNO R3

Finally! The days of Arduino Hacking is here. I bought my own Arduino UNO from Simplelabs along with the Quick Start kit – the main attraction of which was the solder-less breadboard, the wire-stripper and the screwdriver.. (yeah..like I needed those desperately!).

My Arduino UNO R3

Now that I got the Arduino, I wasted no time in pleasing the embedded gods by uploading the classical “hello world” program of the bit world..lovingly called the “Blink”.

The “Blink” is one of the pre-defined example in the Arduino IDE and you just have to verify and compile it and then connect your Arduino board and upload the compiled program image onto the microcontroller. (Yes. there are some pre-requisites before for setting up the IDE and its pretty straightforward. I will write about this setup in the next post.) On successful upload you can usually see the on-board LED named ‘L’ starting to blink. If you are still not convinced with the on-board LED,  you can check the same output by connecting an actual LED between the Port 13 and GND (with Anode[+], which is the longer leg of LED, connected to I/O port 13 and cathode connected to the GND port).

And it shall blink!

# Presenting Non-linear presentations

A presentation aids a public speaker, a professional as well as an academician whenever they step into the limelight to project their idea or achievement to a larger audience. Now, this powerful tool can be made even more impressive by (carefully) adding some non-linearity to the presentation style.

Most of the presentation that we create today is a linear presentation, with a particular order. And although that is a great way of presenting things, sometimes they dull out and sometimes the audience is not immersed enough to understand the completeness of your idea.

If you face such challenges, where you need to get your audience involved in your talk, its a great idea to use a non-linear presentation.

Non-linear presentations are those presentations which uses a series of rotations, translations and zooming levels to emphasize and present the content. Few might consider that calling such type of presentations a Non-linear presentation is a misnomer. Rather it should be called a free canvas mode of presentation where there is a blank canvas where you can put in your entire idea and then emphasize areas where you need the audience attention in order to deliver the idea to them. I agree to that notion but don’t find any fault in calling it non-linear as well, cause it definitely uses rotations!

Now,enough theory..let’s make some presentations. There are many proprietary methods to create a non-linear presentation. Prezi is one among them and like they say.. “When you are creative.. Your ideas matter!”

Now we all can’t afford proprietary software and that is where Open Source steps in to save us. Welcome Sozi. Sozi is an extension of vector graphics tool called Inkscape and using Sozi extensions, you can create SVG files which can be played on most of the modern web browser (like Firefox and Chrome) as a presentation. And since its not flash dependent, iOS devices also shall support it.

So what are we waiting for..let’s jump in and make some non-linear presentations.

The instructions for installing Sozi is present in its website (link given above).

A quick tutorial to get you started is right here.

Enjoy the non-linear presentations! A simple creation from my end is downloadable here. Open it up in a browser!

# Waiting

We all wait for the tides of life to turn in our favor.. For prayers to be heard.. For dreams to be fulfilled…

We all wait for the waiting to end…

Here’s John Burroughs ode to Waiting :

Serene, I fold my hands and wait,

Nor care for wind, nor tide, nor sea;

I rave no more ‘gainst time or fate,

For, lo! my own shall come to me.

I stay my haste, I make delays,

For what avails this eager pace?

I stand amid the eternal ways,

And what is mine shall know my face.

Asleep, awake, by night or day,

The friends I seek are seeking me;

No wind can drive my bark astray,

Nor change the tide of destiny.

What matter if I stand alone?

I wait with joy the coming years;

My heart shall reap where it hath sown,

And garner up its fruit of tears.

The waters know their own and draw

The brook that springs in yonder height;

So flows the good with equal law

Unto the soul of pure delight.

The stars come nightly to the sky;

The tidal wave unto the sea;

Nor time, nor space, nor deep, nor high,

Can keep my own away from me.

WAITING

by: John Burroughs (1837-1921)

# IBM’s First

IBM, as announced, is changing its CEO w.e.f Jan 1,2012. Virginia “Ginni” M. Rometty, is going to be the new CEO.

A few weeks ago when HP, another tech behemoth, gave its reins to Meg Whitman there was a huge speculation of HP trying to follow suit of IBM by bringing in an outsider to lead them out of the messy situation. IBM did that in early 90’s by bringing in Lou Gerstner Jr., the only non-IBMer, who was directly made the CEO. Now there is speculation if IBM is trying to follow suit of HP by appointing a female leader. But these speculation really don’t matter, for both companies are bellwether’s in technology and both leaders able and experienced. And again, HP is not following IBM’s history..there won’t be any spin off’s of the PC business from HP’s side although it was decided so by their earlier leadership.

What’s interesting about Virginia Rometty’s appointment is the fact that she is not only the first women to be at the helm of IBM, but she is also the first Engineer to reach the helm. All other CEO’s at IBM as accounted by this site was from the sales and marketing side.

Here’s wishing Ginni, IBM’s first woman engineer CEO the best!