Github gist link to the Arduino and Python codes is here.