I hereby claim:
- I am sanchox on github.
- I am sanchox (https://keybase.io/sanchox) on keybase.
- I have a public key ASBn-DG74NovwjQ5xbIdImmJ3KLB6UzlbcigKSU2LKIvWgo
To claim this, I am signing this object:
// Decode decodes an array of bytes into an object. | |
// - fPort contains the LoRaWAN fPort number | |
// - bytes is an array of bytes, e.g. [225, 230, 255, 0] | |
// - variables contains the device variables e.g. {"calibration": "3.5"} (both the key / value are of type string) | |
// The function must return an object, e.g. {"temperature": 22.5} | |
function Decode(fPort, bytes, variables) { | |
output = {} | |
if (fPort == 4) { | |
flag_bits = bytes[0].toString(2).split('').reverse() |
#!/bin/bash | |
modprobe i2c-dev | |
I2CBUS="1" | |
I2CADDR="0x49" | |
function h2d() { | |
echo $((16#$1)) | |
} |
#!/bin/bash | |
I2CBUS="1" | |
I2CADDR="0x6a" | |
current_page="-1" | |
function set_page { | |
if [ "x$current_page" == "x$1" ]; then return; fi |
I hereby claim:
To claim this, I am signing this object: