implemented GPIO class in javascript