plug api with gpio module