moved from http://ichiro-maruta.blogspot.jp/2009/05/arduino.html