After working with TinyOS over past one year; I have decided to dive into IoT platforms that have right balance between programmability(ability to program with decent data structures) and compatibility(one that can be deployed to hardware readily).  Contiki is very decent platform that is very close to strike the balance. Following are the reasons I have decided to work with Contiki:

  1. Open Source(Yay!!)
  2. Programming with C(No flavours)
  3. Good hardware support
  4. Modern IoT protocols packages
  5. Great community

Setting it up was very straight forward and I have had no difficulty what so ever. Also, the platform is compatible with TelosB motes; so I have decided to do a simple exercise to get better idea of the platform. I have made a ping pong program with two motes, basically it's a unicast message being transferred between two different motes. Following is the code:



The above two files(ping.c and pong.c) have been minimally documented and should be placed under
/contiki/examples/rime/
and change the directory to the same before running following commands:
sudo make TARGET=sky MOTES=/dev/ttyUSB0 ping.upload login
sudo make TARGET=sky MOTES=/dev/ttyUSB1 pong.upload login
The program should automatically start and you can expect the similar output to that of the header image.

blog comments powered by Disqus