Fix the piezo tone function

Code translated into JS from
https://www.sparkfun.com/products/7950#comment-4eaad84d757b7fd351006efb
Merge branch 'piezo-fix' of https://github.com/bengillies/johnny-five

* 'piezo-fix' of https://github.com/bengillies/johnny-five:
  Fix the piezo tone function