-
-
Save NorHairil/6bb84127f683b20d5e5931a4eb656d5d to your computer and use it in GitHub Desktop.
Google Sheet Decoder for Helium Console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Decoder(bytes, port) { | |
var decoded = {}; | |
decoded.temperature = (bytes[0] << 8 | (bytes[1])) | |
decoded.humidity = (bytes[2] << 8 | (bytes[3])) | |
// TODO: Transform bytes to decoded payload below | |
var decodedPayload = { | |
"temperature": decoded.temperature, | |
"humidity": decoded.humidity | |
}; | |
// END TODO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment