Arduino Pro Mini LoRa Sensor Node
1.0.0

18650 년 보호 배터리로 구동되는 DHT22 및 RFM95 모듈이 장착 된 Arduino Pro Mini TTN Lorawan 노드.
Arduino는 전력 LED 및 전압 변환기를 황폐하여 낮은 힘으로 변환되었습니다.





function Decoder ( bytes , port ) {
var decoded = { } ;
decoded . vcc = ( bytes [ 0 ] + 200 ) / 100 ;
if ( bytes [ 1 ] != 255 ) {
decoded . humidity = bytes [ 1 ] ;
decoded . humidity &= ~ ( 1 << 7 ) ;
if ( bytes [ 1 ] >> 7 == 1 ) { decoded . humidity += 0.5 }
}
if ( bytes [ 2 ] != 255 || bytes [ 3 ] != 255 ) decoded . temperature = ( ( bytes [ 2 ] << 24 >> 16 | bytes [ 3 ] ) / 10 ) ;
return decoded ;
} function decodeUplink ( input ) {
var decoded = { } ;
decoded . vcc = ( input . bytes [ 0 ] + 200 ) / 100 ;
if ( input . bytes [ 1 ] != 255 ) {
decoded . humidity = input . bytes [ 1 ] ;
decoded . humidity &= ~ ( 1 << 7 ) ;
if ( input . bytes [ 1 ] >> 7 == 1 ) { decoded . humidity += 0.5 }
}
if ( input . bytes [ 2 ] != 255 || input . bytes [ 3 ] != 255 ) decoded . temperature = ( ( input . bytes [ 2 ] << 24 >> 16 | input . bytes [ 3 ] ) / 10 ) ;
return {
data : decoded ,
warnings : [ ] ,
errors : [ ]
} ;
}