JavaScript file for grove electricity sensor