Digikey is selling a red Adafruit Metro!

December 28, 2015

I came across this tweet from DigiKey announcing a red colored Adafruit Metro.

What is the Adafruit Metro?

The Adafruit Metro is a variant of the Arduino Uno. It is enabled by an Atmega328 microcontroller. The main distinction between the Metro and the Uno is the chipset used for the virtual COM port. While the UNO makes use of an Atmega16 family microcontroller for the USB interface, the Metro makes use of the FT231X chipset.

I liked the red color and ordered a unit for myself. The rear side of the PCB contains the Adafruit Metro’s BOM from DigiKey.

At the time of writing this post, the special edition Metro was still in stock @ DigiKey. The packaging gave me the impression that the board could have been possibly manufactured by Adafruit on behalf of DigiKey.

Home Depot is simplifying shopping using connected devices!

December 23, 2015

I have been frantically printing ornaments for the Christmas tree using my new M3D printer (my review of the M3D coming soon). The incessant printing clogged my printer yesterday and I needed a steel wire to unclog the extruder.

I checked the availability of a steel wire at the nearest Home Depot using their website. Apart from providing the availability information at a particular store, Home Depot also provides information related to the aisle where the steel wire is located. I was surprised to find additional information including the ‘bay’ where I could find this steel wire. The site also has provisions to text this info to someone.



Location of the item inside the store

I was not sure about locating the item at that particular aisle using the bay information. It turns out Home Depot has started labeling different sections/bays of an aisle using numbers.


Bay Numbers at Home Depot

Home Depot is probably maintaining its inventory at all stores using RFID readers, bar code scanners etc for a while now.

I am glad that they have started helping their customers by providing more resolution to the location of an item in a store than merely stating that “Item X is available at your local store”.

At this year’s ARM TechCon keynote sessions, one of the speakers noted that we are past the era of designing variations of connected sensors. He pointed out that companies have started directing their focus towards enforcing behavior change using connected devices.

It is interesting to learn that stores like Home Depot have already started helping their customers save time by sharing more information about their products using their existing infrastructure of connected sensors.

I am certain that Home Depot has invested in some user experience research to improve their web store shopping experience (for e.g. Paypal integration, text messaging option on the item’s web page) as well as enhance the shopping experience using their current infrastructure of inventory scanners.

Way to go Home Depot!

The S.F. Bay Area is not a haven for the electronics hobbyist!

November 29, 2015

Note: This post is not a hate fest!

I realized this when I was at the Orange County Microcenter in SoCal to get my hands on the Raspberry Pi Zero.

Yep, you read that right! I had to drive 392 miles to get a $5 Raspberry Pi Zero! I plan to share the details of my trip in a later post. While I did this trip for fun, it is quite difficult to buy some discrete components in the Bay Area.

Chicago v.s. S.F. Bay Area


I lived in the Chicago suburbs for 2 years and 3 months before I moved to the Bay Area in May/June 2014.  While living in Chicago, I had several options to buy discrete electronic components:

  • Microcenter– (2 stores in Chicago!) – Carries a lot of DIY kits (I am not talking about the Arduino and Raspberry Pi). Open Sundays.
  • American Science and Surplus (Milwaukee/Foster Ave neighborhood) – This store sells stepper motors, cool DIY science kits, test tubes, conical flasks etc. Open Sundays.
  • Chicago Electronics Distributors (Winnetka)- A distributor of Adafruit products. This guy is awesome. He used to let me arrange a late evening local pickup for emergencies.  I do not recall buying anything on a Sunday from this guy.
  • Fry’s electronics (Downer’s Grove) – The Chicago store is somewhat far away from the city. Open Sundays.
  • Radio Shack – This is no longer an option but Radio Shack carries a couple of components.

Given these options, I could always find a part locally (unless my requirement is very specific/exotic).


There are 3 hackerspaces in the Chicago area. Pumping Station 1, Workshop 88 and the South Side hackerspace. I was a member of Pumping Station 1. It was so easy to build your own enclosures using a laser cutter. Pumping Station 1 is easily accessible from different parts of the city and the starving hacker membership was approximately $40 a month.

S.F. Bay Area:

  • Radio Shack – This is no longer an option. Radio Shack has gotten rid of a part its DIY electronics shelf. Now you could buy some basic accessories like solder.
  • Fry’s electronics – Open Sundays. You could buy some discrete resistors, capacitors etc. Arduino kits etc are ridiculously expensive.
  • Jameco – They have  a store front in Belmont. They are open only Mondays to Fridays, 9 a.m. to 5 p.m.. It is best to order your stuff online and pick it up. They sell a variety of discrete components, kits etc. They do have an online chat support to discuss your order. Good luck driving from San Francisco to Belmont in rush hour traffic.
  • oddWires – This store also allows local pick up but only on week days. I have never used this store as it is very far away from where I live.
  • Hobby engineering – This store provides pickup on all days of the week upon prior arrangement. Their store collection is not so extensive and I never had the chance to use their business.
  • Evil Mad Scientist (Sunnyvale CA) – A re-seller of Adafruit products and they also carry a lot of DIY electronics kits.  The pickup option is available only on week days during business hours.
  • Al Lasher’s Electronics – This store is open 8:30 a.m. to 5:00 p.m. on all week days and 8:30 a.m. to 2 p.m. on Saturdays.  They are a distributor of Sparkfun and they do sell a vast variety of components that peeked my interest.



A sign inside Al Lasher’s electronics


Al Lasher’s electronics, Berkeley CA


If you have plenty of time in your hands and if you are trying to buy an Arduino or a Raspberry Pi, you can try crawling through craigslist. If you are lucky, there might be some one in your area who is trying to getting rid of their electronics stash.

Arduino_Raspberry Pi

Search results for arduino in the SF Bay Area Craigslist

Update (06/21/2017): A reader left a note in the comments about HSC (Halted Electronics) and Anchor Electronics in San Jose. I have been to Halted Electronics in San Jose. It is a big store and they carry an array of components but you have to be patient going through different aisles. If you are looking for cheap DC motors, HSC is a great resource. I haven’t been to Anchor Electronics. Thanks Travis!


I learned of 2 hackerspaces in the Bay Area namely Noisebridge and Tech Shop that is equipped with tools like a laser cutter. While TechShop is a bit pricey, applying for Noisebridge’s membership is a tad complicated.  You need two members who could potentially support your membership application. This is probably to prevent abuse of the hackerspace equipment. Given my socialization skills,  securing a membership is next to impossible.  I decided to navigate this situation by getting my own 3D printer.

It might appear that the Bay Area has several options for a hobbyist. It is just difficult getting to these places when they are open.

As you may have noticed, most of these places are open only on week days except for the hackerspaces. The traffic in the Bay Area is insane until around 7 p.m. (more like 7:30 ish). Most of these stores are closed for business by 7 p.m..

When I was at the Orange County Microcenter to buy the Raspberry Pi Zero, I recalled all the options I had back in Chicago.  I was told that there used to be a Micro Center in the Bay Area but they had to shut down.


Fully stocked aisles at the Micro Center

The Bay Area is home to a lot of semiconductor manufacturers, smart device manufacturers etc. Yet, you have to go online to buy parts for your project.

As the title states, the S.F. Bay Area is not a haven for the electronics hobbyist.

P.S.: If you know of a great resource that I missed here, leave a comment.

Raspberry Pi Zero + Pi Supply’s giveaway

November 26, 2015

The Raspberry Pi foundation announced a new variant of the Raspberry Pi this morning (around 2 a.m. ET). It is called the Raspberry Pi Zero. I have written more about it in this post. Check it out!

The Pi Zero is here! | DIY with Pi

Pi Supply’s giveaway

The Pi Supply store is giving away a Raspberry Pi Zero to a lucky winner. Entries are accepted until December 2, 2015 and the winner would be announced on December 6, 2015. Click this link to enter the contest.

Disclosure: For every person that enters the contest using the above link, the chances of my winning increases since I get 3 entries for every referral. Do enter the contest if you are interested.


Notes from the Sigfox “Connect your city” Hackathon

November 24, 2015

I attended the Connect your City hackathon organized by Sigfox and the city of San Francisco. It was absolute fun.

What is Sigfox?

Sigfox is a European company that has installed low power wide area networks across several cities in Europe and San Francisco.  Sigfox’s radio network enables interfacing low power sensors to a network enabled by radio transceivers installed in San Francisco’s public libraries.

This radio network enables transmitting a 12 byte message at a time and it is capped at 140 messages per day. This network is very useful in the case of interfacing sensors that do not provide real time updated. For example. sensors that report their status every hour or so, panic buttons that transmit emergency alerts to first responders etc.

The Hackathon

In the hackathon, teams were given the Texas Instruments Sigfox boosterpack, access to the Sigfox backend, assistance from Microsoft’s Azure team and Plasma/Connect2me. The hackathon’s objective was to build proof-of-concepts that would have a civic impact in the city of San Francisco.

My team’s project

My team picked a project that enabled collecting information related to the number of people assembled in any room of a building. This information is transmitted to the Sigfox network in the event of an earthquake (detected by an accelerometer installed in the building) or whenever a panic button is pressed.

We also used a PIR sensor, temperature sensor and a force detecting sensor to simulate events like large pillar columns falling down, buildings catching fire etc. This information could be used by first responders to effectively deploy resources in an emergency.

We built two gadgets. I built one of them and is shown in the figure below. It includes a panic button, temperature sensor and a force detecting sensor.


Gadget that I built includes panic button, temperature and force sensors

My team mate Yingxian built another radio that gathered information from an accelerometer and a PIR sensor.

photo (4)

Photo Courtesy: Yingxian Wang

The radios transmitted the messages to the Sigfox radio network. The transmitted messages were supposed to be used for visualization in a web dashboard like the one shown below.



Dashboard by Tim Strickland

How does this gadget work?

The figure below provides a simple description of how these radios interact with the “cloud”.


We got an unlimited evaluation license for our radios and our radios did not have any daily cap on the number of messages that could be transmitted to the network for development purposes.

The radios were very easy to use. They transmit any message received through the serial port. We used an Arduino Yun to interface our sensors. The Arduino Yun transmits the message to the radio via serial port. It also talks to a processor running linux on the Arduino Yun. Here is a short video of my project: It sends an emergency alert to the Sigfox network and plays an audio alert.


Here is another video where we simulated an earthquake. My teammate,  Yingxian wrote the code to detect earthquake like movements to detect earthquake simulations using an accelerometer.

My team

I met my team mates at the hackathon and I am amazed by how we were able to get along with each other. Here is a pic of my team after the hackathon prizes were announced.


Left to Right: Yingxian, me, Tim, Louis, Albert and Alex.

Who were the winners?

AudioArgus – A team that built a service that predicts faulty rotary/reciprocating equipment requiring service and alerts the city about it. I see this as a project that enforces behavior change using the Internet of Things.

Dry Water – A water sprinkler controller project that considers several weather factors to turn on/off a sprinkler. I see this one also a behavior change tool by building connected devices

There was also a bike project that enabled enhancement of bike rental experience. I am not sure that I am able to recall the project’s theme correctly.

  1. The radio network’s coverage spans between parts of San Bruno in the San Francisco Bay peninsula, Hayward in the eastern side of the Bay, parts of Marin County and Berkeley.
  2. The sketch used to transmit messages is available from here.

What next?

I had fun working on this project last weekend. This has motivated me to register for another smart city hackathon on December 5th. If you are interested in working on a similar project (not the same one) at that hackathon, you should write to me @ yamanoorsaiatgmaildotcom or ping me via twitter using the same handle.


DIY IoT Project | Planning a trip to the Sierras using a Raspberry Pi | Part 1 | DIY with Pi

June 1, 2015

Re-blogging my own post from another blog on using a Raspberry Pi to retrieve California state highway road conditions.

Mono Lake, California

DIY IoT Project | Planning a trip to the Sierras using a Raspberry Pi | Part 1 | DIY with Pi.

Flashing an Arduino Mega 2560 with firmware stored on a micro SD card

May 31, 2015

I was trying to determine if it is possible to remotely flash firmware on an ATmega2560 microcontroller using a micro SD card. I came across this repository of an ATmega2560 bootloader that flashes the microcontroller’s flash memory when a particular address on the EEPROM (Address: 0x1FF)  is set to the value ‘0xF0’.

When the microcontroller is reset, if the EEPROM value(at address ‘0x1FF’) is set to ‘0xF0’, the bootloader looks for a file ‘firmware.bin’ on the SD card and flashes the microcontroller with the new firmware.


Adafruit Music Maker shield mounted on the Arduino Mega2560

I had to make minor modifications to make use of this bootloader. I changed the Chip Select pin number of the micro SD Card (there are tutorials that explain how SD cards are interfaced to microcontrollers) in the macro definition to match that of the Adafruit Music Maker shield (the micro SD holder’s chip select pin is connected to Digital Pin 4 of the Arduino. This corresponds to pin 5, PORTG on the ATmega2560. Source: Arduino Mega 2560 schematic).

In the file asmfunc.S, I changed the CS pin to pin 5 on PORTG:

I also had to change the pin number of the LED used to indicate the progress of flashing the microcontroller by the bootloader.

After recompiling the bootloader’s source files, I flashed the new bootloader using AVR ISP MK II. I also had to make sure that the BOOTRST fuse was set in the ATmega2560’s fuse settings.


ATmega2560 fuse settings

I compiled an LED blinking sketch and converted it into a binary file by executing the following command:

Note: The Arduino IDE compiles and stores its hex files in a temporary directory. In order to save the hex file upon compilation, edit the IDE preferences after closing the IDE. The preferences text file can be located at File–>Preferences


Arduino IDE preferences

A line build.path has to be added to the preferences file. I included the path where the output of the compiled Arduino sketch would be located. I used Atmel Studio to convert the Arduino sketch’s hex file to a binary file (the avr-objcopy command shown in the above code snippet). I copied the binary file onto a micro SD card and inserted into the music maker shield’s micro SD card holder.

I made use of this sketch to set the value ‘0xF0’ at the address ‘0x1FF’. Upon reset, the bootloader flashed the microcontroller with the binary file located on the SD card.

Things to investigate:

1) When I was looking for a bootloader that would flash a microcontroller from an SD card, I read about problems encountered by others. I found out that people had problems using certain types of micro SD cards. I did have a hard time getting the bootloader working but it was due to the fact that I did not set the BOOTRST fuse.

Do let me know if you have used this bootloader or something similar in the past.