Wednesday, May 9, 2018


I had to travel to Atlanta last week for one of the meetings at work. Finally I made it to all 4 timezones of USA. Austin, Salt Lake City, Seattle and now Atlanta. My office was in Roswell which is outside of Atlanta and quite a lonely place at times. May be I was staying in quite far from happening, I did not see much people walking on the streets (sitewalks to be precise :) ).

Sunday, February 11, 2018

Harvesting Your Old Smartphone Senors

If you check the list of senors that even a basic smartphone has in the manual you will be surprised to see a long list. Ambient light senor, Gyroscope, Magnatometer, GPS, Sound noise level, Gravity etc are very common even in the cheapest smartphones. If you have a old smartphone, which you may not be using for some other issues, can stil have all the sensors working properly. You can stream the senor data to another computer or cloud, which you can process and possibly perform some actions.

I used an app called Sensor Node where you can mention the IOT server address and Topic name where the phone's sensor data should be streamed to.

Finally the following web utility (thanks to ) can be used to visualise the data in real time.

Shooting the Super Blue Blood Moon

There was a very rare astronomical event on this 31st Jan. It moon was at the closest position relative to earth on this full moon day. Hence Super Moon. It was also the second full moon of the month, so it was also a Blue Moon. Remember the saying "Once in a blue moon"? It means "rare" event. Obviously having two full moons in a month is rare. Usually, they occur on the very first and last day of the month as there is always a gap of a month between them. So it was 1st and 31st Jan. Now the Blood Moon meant the moon was going to turn Blood Red for some time. It happened during total lunar eclipse when Moon does not get any direct sunlight (due to earth's shadow falling on it) but it gets the light refracted from earth's atmosphere (mostly from the limbs) which turns moon red.

In the past, I had seen a lot of eclipse montages where people stitch various stage of eclipsed Sun or Moon into a single photo. I tried the same this time as well. Used an 18-55 Canon lens to capture a series of photos starting from the totality of lunar eclipse (because by the time moon rose and visible that evening it had already reached totality) to the end of the eclipse. I was not sure what was the right interval of clicking photos so I set a very frequent interval of 1 minutes. Used the intervalometer of magic lantern firmware in my Canon 600 (T3i). I realized 1 minute was too short of an interval. So I took every 3rd photo which resulted in clearly separated moons in the composite. Finally used GIMP to mask the moon in all the layers except the 1st shot which had the ground.

I captured all the photos in RAW mode so that I could control the exposure in a better way so all photos needed to be converted to JPEG before I could import them into GIMP. I  found a utility in Mac to batch convert RAW to jpeg. So following command, every converts every 3rd RAW images  IMG_0692.CR2 onwards which are in sequence

for i in *.CR2;
     j=$(echo $i | tr -dc '0-9' | cut -c 1-4)
     if [ $j -gt 0692 ] && [ $((10#$j % 3)) == 0 ]
      echo $((10#$j % 3))
      echo $j
      sips -s format jpeg $i --out "./jpegs/${i%.*}.jpg"

Friday, December 1, 2017

A Month With Amazon Echo Dot.

Amazon Echo was released in India last month and I bought one right away. I was actually waiting
for any of the voice assistants to be released, I would have personally wanted the Google Home to be released as I have been trying to build some Google assistant apps lately. Also Google kind of has all my personal data and it could just crunch and give me the right information in right time like Google now does in phones. I had recently successfully run Google Assitant and Amazon Alexa on a Raspberry Pi3 but the features there were very limited. The Echo Dot was very cheap and I had a spare Bose sound doc with Bluetooth receiver which I could connect to Echo Dot. Following is my impression after using it for a month
  • Voice recognition is amazing (both the word "Alexa" and the question followed). Even from the other corner of the room, I ask something not very clearly (e.g. in grumpy voice) it recognizes it. It even worked with my friends who have different accent than me. Great job Amazon there.
  • I am a big-time radio listener it can play and switch to almost any internet radio channel from TuneIn in a second. It's really painful to search and change stations from a Bluetooth connected phone and if you get any call or notification in the phone it would interrupt. I usually play BBC world service, VOA, 977 adult hits, NDTV India etc.
  • I could also play any songs (Primarily English  & Hindi) from Prime Music randomly as it occurs to me, right from my desk or sofa while working on a laptop or playing with my daughter. When you play from the phone, it can be interrupted during notification and calls and the phone has to be near me, I need to locate the music app and search the song. Also sometimes when you want to immediately pause/stop/lower the volume it's not straightforward with the phone, with a lot of apps running. There is no custom playlist yet that you make and let Alexa play. It just learns from your pattern and tries to play the artists you may like when you don't mention what songs to play. I am waiting for the prime music to be launched in mobile. I will probably cancel my Google Music subscription (I can't play them in Chromecast and completely go Amazon.
  • I don't really have any smart light yet as they are very expensive but it could be useful. I am planning to buy TP-Link HS100 Wi-Fi Smart Plug.
  • It can read the news headlines from your choice of sources i.e. NDTV, TOI, and Cricinfo when you ask for Flash Briefings but once you enable the sources it will play all of them one by one, which is very annoying. Why can't I ask for the source I want. In most cases, content is same across sources.
  • I am not able to add my work calendar yet (Microsoft Exchange) as it requires my company's IT admin rights. I don't really much on Google Calendar except reminders to pay credit card bill.
  • I am not really interested in asking trivial questions like (how are you? and how old are you), it could be funny to demo but pretty much useless. Even weather does not change much in Hyderabad.
  • I am a podcast listener as well but the AnyPod skill is not really easy to manage and it can't pause the episode.
  • Once in a while, I have asked cricket scores during the current Ashes and India-Srilanka series.
  • I have set reminders and it's more useful then smartphone as it just shouts outs loud when if you get to check your phone.
  • I have not found a good skill to ask about my investments stock market (app idea?).
  • Uber skill is buggy as it goes into loop and I am yet to try Ola. Hope they fix the skill soon.
  • My most wanted feature is to be able to make calls but again not sure if I ever call someone with speakerphone on.

As you see I am mostly using it for radio and music, however, I am looking for ideas to build skills myself which can make things easier for me. Feel free share ideas in the comment :)