After a pretty long wait, the 3Doodler turned up in the mail today !

Of course, you can’t lose any time getting started with it, so I opened up all the tutorials I could find so I could get started drawing. Getting started was easy enough, with the biggest problem being the question : “What to draw first ?”

Well, I got it soon enough. I should make myself a pair of cool shades / safety goggles to show off / work with. So I grabbed myself a pair of shades, sketched an outline (to ensure good fit), fired up the pen, and got started. The first results are below !

3DG Glasses

Using the pen is fairly straightforward, you just have to keep drawing. Adding “finishing” touches so as not to leave strands dangling can get tricky, and I guess I’ll have to learn how to finish the strokes smoothly. It will also take a little time getting used to the flow of plastic to avoid the wavy and thicker lines in some places.  Also, the tip gets really hot (like a soldering iron), so be careful !

That said though, it is totally cool to be able to draw your wireframes or objects in 3D, it’s like taking things to a whole new dimension (quite literally !). I’m off to figure out what to do next, keep watching 😉

Controlling TiM LED Matrix boards with Arduino Uno

I have a TiM LED board from my helpful maker friends at Wyolum to play with, and was wondering what cool application I could make out of it. I was thinking of games, animations and the like, and started to put things together, just to test waters and see what it would look like.

Well, first roadbump. There were a couple of things missing. They weren’t so big as to cause major inconvenience, but it definitely would help visual applications if I added them. I am talking about row manipulations, allowing us to manipulate the board as a whole (or a collection of rows) , rather than as individual pixels.

Well, having had some experience with programmable RGB LED strips before (though those were LPD8806 based, not WS2811 based), I quickly added the helper methods, and put together a quick sketch using the ever-so-useful Arduino Uno. I made a quick video of it, I am going to keep playing with it for a while, something cooler just might be on it’s way ; )

Here is the github link to the sketch and the library : https://github.com/ankitdaf/TiM/

And here is the video :

InstallASound – Sound Shield for Arduino

Hello guys !

A little while ago, the amazing folks at Wyolum announced the Wyolum Innovation Grant. Hardware takes time, money and material to prototype, build and test, and these factors are often an hurdle for independent inventors who don’t have access to huge pools of resources. This grant provides funds 100% open-source hardware projects so that ideas / projects / prototypes in various stages of creation can progress further. What the inventor gets out of it is a chance to further their work with the help of the funds, and what the community gets is open sourced designs of hardware that they can emulate (or buy), as well as a knowledge base that is created out of the experimentation and testing that is carried out towards these products.

Well, as a part of my work and wanderings, I have come across quite a few cool projects, and those gave me an idea for a few more. Reading about the Wyolum grant inspired me to pitch in a proposal to convert one such dream project into a reality.

The need :
A wide audience uses Arduino for prototyping, experimentation, automation and other applications. There are a lot of sensors and actuators out there, as well as a lot of shields. However, one thing I did not easily find was a way to add sound to projects. Having talked to quite a few people, I found that there weren’t shields that were readily available locally, nor cheap enough. The few options that do exist either do too much (and thus add to the cost), or too little (cannot play MP3), or are just plain costly.

The idea :
The idea is simple. I wish to prototype, test and make available a Sound Shield for Arduino. It does not attempt to do much, just enough. The objectives are simple :

1. It lets you easily add sound (compressed formats too) to your project
2. It must be cost-effective

The Features :
1. Output from a 3.5mm Audio Jack
2. Commonly and easily available components to be used so you can source and build locally
3. Volume Control
4. Optional hardware control (play, pause, next) buttons on the shield
5. Software library

Here’s my entry : https://plus.google.com/104739836058436938860/posts/T5tn4YMpsnm

And here’s the video I made for it :

Can you help me ?

Please upvote my idea here :  https://plus.google.com/104739836058436938860/posts/T5tn4YMpsnm by clicking on +1

Thank you, and I hope to create this soon ! 🙂

Teaching and Unlearning

I had the opportunity to visit the Srishti School of Art, Design and Technology in Bangalore to conduct a workshop on exploring the possibilities with technologies as a part of my work at Arduino India. I was very excited, and a little apprehensive at the same time. What would teaching them be like ? The little information I had about the students was that they come from a diverse background and have different skill sets and expertises, and that we have kits (the contents of which were unknown to me, hah). With that little information I had in mind, I had to tailor my presentations and teaching to make the maximum impact. Like jumping into a pool ? Pretty much.

The conversations that I had with the faculty there before the workshop however put me at ease, especially when there are words like “no pressure”, “keep it open” and “go with the flow” thrown around. So here I am, walking into a classroom with a bunch of cool budding designers, a couple of presentations lined up and trying to let serendipity happen. Even with an opening line of “When you have is a hammer, all you see is a nail”, I was in a for a bigger surprise than I expected.

While teaching them, I realized / learnt quite a lot of things, and I am going to talk about some of them. The most important one ? Assumptions SUCK. The place assumptions belong to are outside the window. For example, having taught what a component looks like, I asked the students to find it in their kit as we were going to use it. I ended up with a couple of people holding a diode instead of a resistor. Why ? Because I had assumed that the difference between the appearance and functions of a diode and resistor were clear to all (even though I hadn’t talked about the diode previously). Or when I asked people to connect the brown wire to ground, and I was told that they did not have a brown colored wire, they only had blue. This wasn’t silliness, no indeed. Such small things are assumptions we make, that make us stumble, the same way that a badly designed product is of limited use to the end-user.

After working with a few different sensors and talking a little about actuators, we got into a chat about things around that we could use as input stimuli. What amazed me next was the quick list of 37 (non-exhaustive) list of ways in which we could use something to trigger a reaction in an object or environment that made itself materialize rapidly. People learn, they learn fast, and they learn even faster if they are invited to tie in what they already know to something knew.

This week, I hear people coming back after the workshop with their ideas, discussing what they are doing / what they want to do, and how they can use Arduino and other technologies in their installations. I am doing all I can to unlearn the “rules” that I was once taught, and I am enjoying it. Teaching is fun, unlearning is amazing.

Bangalore Needs Change

Travelling in Bangalore isn’t a piece of cake. Not at all. You’ve got to brave traffic, pothole-ridden roads, some very-very inconsiderate bus conductors (who will either pocket the difference or ask you to disembark), jampacked buses that make you feel like you are in a fevicol ad, and almost every other rickshaw-driver trying to earn as much as they can from every single passenger (I wonder why, the conspiracy theorist in me thinks that they do this so that they can go home at 9.30pm too and contribute to the lack of public transport here).

Sure every city has these, you would argue. Which is also why I shall not go into those. But there is another problem which is really irksome.  BANGALORE NEEDS CHANGE ! LITERALLY !


Not to sound overly dramatic, but this has been a really annoyance. I have had delivery boys and shopkeepers who won’t return change, bus conductors who have written “balance amount” on my tickets and I have had to disembark without it because they did not “have change” when it was my stop, and rickshaw drivers who won’t return change (often, they deal in just denominations of 50, and anything else, they treat it as change, to be pocketed). Seeing that I didn’t have change, and no one in the buses seems to have any, where is all the change ?! Where is all the change going !?

My question, dear reader, if you happen to be able to answer this, or if you happen to be able to question with me is, WHERE is the change ?

P.S. If this seems to you as trivial, frivolous, attention-seeking etc. , well then we probably have different sensibilities, and I am not aspiring nor claiming to everyone’s sensibilities

Understanding Humans – Social Psychology talk

A little while ago, I was lucky enough to chance upon a course on Social Psychology on Coursera that talked about how people think in relation to others. Apart from being interesting, insightful and a lot of fun (also a good amount of work), it also tried to provide a better way of understanding people and improving yourself based on that.

Barcamp Mumbai 12 Talk

I took a session on “Understanding Humans : How to do it good” based on the concepts I picked up from this course at Barcamp Mumbai 12 this year. For those of you who did attend, and also for those of you who did not, here’s a summary of that (unstructured and random) talk :

1. Construction of Reality :
People are the result of their enviroment, their past and their expectations. This affects the perception of their reality. What this means is that the same object, the same person and the same event is perceived by people differently. Factors that also affect this perception are :
– what we want to see (these are our expectations, that color our behaviour)
– what we expect to see (we might expect someone to be opposed to us beforehand, and that could shape our attitude towards them )
– what we are paying attention to

A classic example is a cricket match between two teams, where you and your friends are supporting opposing teams. Any incident that might happen, is view differently by you and your friends – you tend to see the fault of the opponents more than those of players of your own team.
Knowing this, you could take a step back , and as the phrase goes, “Put yourself in the other person’s shoes” and get a better result for everybody.

2. Attribution Theory

A fundamental mistake that everybody tends to make is attributing behaviour to someone’s personality and disposition than leaving some room for doubt about the situation. Judging people so is biased, not to mention not useful at all. Sometimes, people behave in ways that displease you, sure, but they might not be predisposed to behaving that way and the situation might have influenced that behavior.

If you can think of instances where you have let occurrences of events make you comment about the habits / nature of a person, you have probably been making this error. You do not have to give them the benefit of doubt, but it helps to leave some room for doubt sometimes.

3. Confirmation bias

“We see what we are looking to see”. This is the most concise summarisation of this bias that most of us have. This affects not just social relationships but also professional work. When we have preconceived notions and beliefs, we will jump at the smallest and every piece of evidence that supports our expected results. In doing so, we often don’t even stop to cross examine evidence that might suggest otherwise. This can make us wrongly judge a person, and is the reason behind “cover-ups”, “burying evidence” and scientific studies which have manipulated results.

4. Self-fulfilling prophecies

These are slightly complex, and happen in part because of expectations. This is better explained with examples. Studies were conducted in which a group of students were described as being “promising and smart” to their teachers. These students were chosen at random, and there was no basis for actually marking them. Their academic results were observed a while later and it was found that they did indeed perform better than their usual and in a lot of cases better than others as well. This happened because the teachers were told of them being “special”, and they paid extra attention, gave a lot of positive reinforcements to them in particular etc. thus causing the change.

Another example is that if people believe that a particular person if opposed to them, they behave differently, which in turn causes that person to oppose them though they might not have done so in the first place.This is also how bullies are formed.

Another simple example mentioned in the Social Psychology course is interesting to understand this. Assume two neighbouring countries, A and B. Assume that A “thinks” B is arming itself for war. Country A will start moving its defenses along the borders. This movement might be interpreted by Country B as an act of aggression and thus B might start preparing itself. Country A could see this preparation as confirmation of its suspicion, and the countries might actually end up at war with each other, the basis of which was nothing to begin with.

5. Attitude Behaviour Inconsistency

What people believe and how they behave about matter pertaining to that belief are not always in sync. It is generally thought that people will behave according to their professed beliefs, but that is very often the quite opposite of what actually happens. People claim to have particular attitudes but do not behave accordingly. When this discrepancy is pointed out, they often change their professed attitude much easier than their behaviour.

Tips on getting things done

There are three “hacks” that generally could help you get what you want (I am not advocating any of these methods, just presenting )  :
1. Foot in the door : Make a small request, get it granted, that is your foot in the door. That can then improve your chances of getting a bigger, related request approved.
2. Door in the face : Making a huge unreasonable request first can improve your chances of getting a smaller, related request fulfilled. This can be thought of as “compensation” for guilt that sometimes accompanies denying somebody of something. Kids get good at this over the years ; )
3. Low-balling : This is the hidden costs method. You express a request first and get it approved without mentioning the full implications of the request, and after it has been approved, a lot of hidden costs are attached to that request. This happens often in the case of modern day marketing and sales.

I hope this helps, it definitely did help me in understanding people better : ) Cheers !


Hello Arduino India !

The past year has been an amazing one. Driving two projects from scratch to readiness over the course of a year, at MediaLab Amsterdam let me live in lively Amsterdam and hop to quite a few cities over Europe. The travel and living apart, the experience has been spectacular ; lots of brilliance encountered, people met, lessons learnt, blinkers taken down and eye-openings experienced. It has been a stellar year, it has been good. A big thank you to everybody at MediaLab who worked with and around me, and those who were around, for making all that happen.

Well, the year is out, and here I am back in Mumbai. But not entirely without reason. A little while ago, I happened to strike up a conversation. As the nature of things and conversations goes, things got heated up, one thing led to another, some decisions were made. And, as such things tend to go, it brought me back to India. With what promise ? An interesting challenge, a chance to make a difference. What am I going on about ?
Here’s a little something that I sketched up in anticipation ( and excitement ; ) )

I join the team at Arduino India starting Monday, the 7th. I am moving to Bengaluru for this, and think of it as the beginning of even more awesome times ahead. What am I going to do there ? What is the work like ? What is the team like ? What do we aim to do at Arduino India ? Like the plug goes,”Watch this space for more” ; )

P.S. If you are in Bengaluru this Sunday (6th October), do drop by to say hello and strike up a conversation (awesomeness on offer ; ) ) at the Arduino India booth at this event —> : Electronics Rocks 2013

Data Visualization – GPS logs from Google Location History

It’s been 10 days since I am back from a 5 month stint in Europe, and its 10 days to move on to my next stint (more on that very very soon 😉 ). Being in Mumbai has its perks, with the alma mater, friends, vada pav and Marine Drive being high points. However, 20 days of doing nothing can really get to you, and you need to keep on doing something just to keep sane.

I had wanted to do a data visualization project for quite some time, and I had always wondered what data I could use. Being back from Europe and having travelled a few cities, and owning a tablet, gave me the spark I was searching for. I had 5 months of GPS data (recorded automatically by my trusty companion, the Nexus 7) logging my travels. That amounted to 73,000 recordings, spread over 5 months, 6 cities and a lot of geography.

Well, Google Location History exported all the data to a KML file readily enough, and there I hit the first hurdle. Too much data. I had data from all over, starting from India to my transit there via the Middle East, and those points just seemed like “outliers” (data which was much different from the rest). So, before I got around to plotting anything, I figured I ought to delete some data, and I set about to do it. Unfortunately, the KML exported by Google Location History isn’t exactly the most beautiful.  Data is split across two lines, one with time and one with co-ordinates, and needs a bit of work to be made into CSV, so one can do some mathemagic with the numbers. So, what do you do ?

I learnt vim. I went and talked to a friend, and showed him what I was doing. He fired up vi, typed in a few commands, and there was my data for one city, all cleaned up and ready to be analysed. So, I went home that night, fired up vimtutor, and learnt vim. Totally worth the two hours I put into it.

Discussing what I was doing also helped me brush up statistics and algorithms. Lots of ways come to mind about ways to “cluster” the data. Since a lot of points were pretty much the same location, with all the quirks of GPS measurements, they could be replaced with just one point. Additionally, I could take a city’s data , combine it with my knowledge of my walk in the city, and use k-means clustering to cluster it into a few places that I hung out. That raised the question, did I really want to cluster the places, when the aim I had in keeping logging turned on was to record everywhere I had been and to later see and show all the streets that I had walked ? Ought I just show all the data points, or would it be nicer to show the path I followed, step by step, and with insights into how much time I spent where along the way, maybe for some other traveller looking for something like I had ?

Too many questions, or rather decisions and tests to make, and not too many answers. So, while I figured it out, I went ahead and plotted a few of the cities I visited on a map, using Google Fusion Tables (incredibly easy and handy). Here are a couple of those maps, until I decide to (and/or) finish this project. And if you want to play with this dataset yourself, you can get it here : http://imojo.in/gpsdataset

Also, some terms that you might like to look up, that I came across while working on this : [ clustering, k-means clustering, elbow method, visual block mode in vi, Manhattan distance, curse of dimensionality, forward difference, second forward difference, normalisation, outliers ]

Physical Integrity

Software can be tested. Test cases can be supplied, performance can be measusred and the output verified. In open-source software, the code can also be read and one can understand the thought and techniques and other intricacies and decisions that went behind making that piece of software. In other words, the entire body and soul of the product is out there in front of you.

All about coffeeThe same can be known about coffee, if you put in the effort. I recently came across an image that expresses exactly that. You can know where the coffee originated, the processes it went through, the people involved and other details. The complete life of the product (though to many people coffee is more than just a product, more like a piece of art) can be put in front of you, the user, the consumer, anyone who deigns to ask.

Why not with hardware ? And when I say hardware, I don’t mean electronics. Sure, hardware, electronic or otherwise can be “tested” for particular things. Stresses, strains, temperature responses, resistances, brittleness, opacity and a ton of other things can be “tested”. Electronic goods which are assembled have QR codes on every major component in them, but they don’t tell you where they were made, what processes went into making it and the like.

I can understand that there is the “too much information” argument, and about the usefulness of it. But I liken this idea to that of a “physical MD5 checksum”. There is an “MD5” checksum to check the integrity of code, to see if the product as it was packaged and supposed to be. Having a physical MD5 checksum, could open up quite a few possibilities.

– You could actually be able to check if things actually are what they claim to be. With the advent of 3D printing, this should be a pretty useful testing probe.

– You could distinguish your “Made in Taiwan” from “Made in Korea”. Win for activism and awareness, not such a pleasant thought for corporates and governments.

– You could know how your product is made, where it is made, if the product you got is the one you paid for or one with a “cheaper / less reliable / more hazardous” component

– You could actually know if and how your Apple product is worth the “premium” that you pay for it over other alternatives, without having to rely on marketing content manufactured for you by any company

There is quite an obvious con too. Manufacturing secrets and processes could be revealed, which in most cases are patented trade secrets and often minor things are differentiators between products, and wouldn’t do well to be revealed. But then, this entire idea is about accountability and openness, so I guess there are decisions and trade-offs that would need to be made.

One more disadvantage would arise from having too much information. Knowing too much and having too many things to choose from, can paralyze you. Nevertheless, choices can be broken down, information can be prioritized, and made manageable. There are complete industries and professions that do that. After all, where would we have been if we had not accepted use of fire because it could burn if improperly used ?

P.S. I hereby certify that this entire thought was not influenced by any sci-fi movies, but by the simple question I had when I was in a supposedly career-deciding examination – What if my food or drink which was instructed to be left unprotected in a common waiting area was tampered with ? There should be a checksum for that.

P.P.S. Feel free to start a discussion with me by dropping me an email 😉

Scheming Supermarkets

How many of you walk to the nearest super-market the first thing that you think “I need to buy something” ? To how many of you does that come impulsively, like muscle memory ? Here’s a little something to make you walk an extra bit further, or keep your eyes that extra bit open.Receipt

Ever since I have been living in Amsterdam (been a while), I have been walking to the nearest supermarket, which more often than not turns out to be Albert Heijn. The parts of Amsterdam I have seen, I believe that the Albert Heijn chain was planned by walking through the city, and placing the stores strategically so that one would never have to walk more than 10 minutes to get to an Albert Heijn. Well, based on my experiences with buying from the local small grocer and buying from the supermarket, here are a few thoughts :

– There are no price tags on products (not only in this store, but any other). I understand the “saves labor if prices change” argument, but it is not in the interest of the consumer either if the price can be changed at a click, arbitrarily and by almost anyone, even. It’s easy for “mistakes” to flow through, honest or dishonest.

– Products are often ‘misplaced’. I have sometimes picked up a product, reading its price tag as say X, but paid more, because, the product was not near the correct tag, or it was a different product. I would put it down to consumers checking out products and not putting them back correctly, but it has happened more often than that for me to dismiss it. I have explicitly observed a label of product A and no sign of it anywhere, and product B in its place. At home, out of place.

– There are “mistakes” in price tags. More than once, I have paid more than the “discounted” price tag for the product. I have had that nagging feeling, ‘Hey, this is not what the price tag said’.

– Another move that makes things work in favor of super markets is that the checkout counters are placed right at the end, and you checkout after you have done all your picking. People who have placed something in their cart aren’t likely to opt not to buy the product _just because_ it is 10 cents more expensive than they thought. And they aren’t very likely to argue either on the price, seeing that the aisle from where they picked up the product is far away and there is (usually) a queue of customers behind them.

– A lot of people often don’t ask for receipts since they shop everyday at the supermarkets and never do examine the prices of what they bought. Even if they do, they don’t really have a ready comparison to check if they were charged right.

So here’s what happened :
Last week, I had some free time on my hands, and thought, ‘Let’s buy some fruit, try my hand at eating healthier’. I walked with a pack of strawberries to the checkout counter, and got charged 50 cents extra for it. I had some time on my hands, so I went through the supermarket again (after paying), checked the prices, then went to the reception, pointed out the discrepancy and had them walk with me to check it out. One of the products, it turns out, was not overcharged (it was a different product from the one that I had assumed based on the tag, the names being the same but one being wholesale and one being a retail price, the difference between 5kg and 1kg packs ). The second one, however, was indeed over-charged, and the agent spent the 30 seconds walking back with me to the desk trying to explain to me that it was a “computer mistake” and “such mistakes happen”. Well, if such mistakes happen that often, I am quite interested in knowing in whose favor they go.

I don’t know (and I didn’t bother to find out) how many stores of this chain are in Holland (or elsewhere), how many people go to them everyday, and how many of them end up paying for the products with “mistakes”. I do make a simple calculation though. I was charged 50 cent extra for a bunch of strawberries. Assuming each store sells 50 such boxes a day (they were on discount, I am sure they sell more), they earn 25 Euros a product a store a day. I know that there must be at least a 100 such stores in the country. That would comes to 2500 Euros a day per product per mistake. I know these are overly simplifying assumptions, but they are not unreasonable and I am estimating they are under-represented even with this. I don’t even want to point out how much an average household spends per year on daily household goods, and how much of a difference a mistake of even 10 cent per 10 Euro purchase could make them, its just very sad.

Wow, talk about lucky mistakes. I’d sure love to make some such.

[ Note: There is a whole study and discussion about pricing strategies to make consumers spend, but you can read it here, I don’t have much to add to the discussion there : http://www.amadorbooks.com/nocardsh.htm ]