Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Lab: Node.js MQTT Client
Lab for MQTT
cd mqtt_test; npm install
node mqtt_test.js
MQTT
Broker
Raspberry Pi
Web
Server
(Node.js )Publish
{"x":0,"y":...
Run G-sensor app on Raspberry Pi
cd LIS3DH ; ./build.sh
./GSensor
方位
X>0
朝正面 Z>0
Y>0
MQTT Demo
References
https://github.com/mqttjs/MQTT.js
https://goo.gl/8ZQ39e
https://goo.gl/McM4sy
Upcoming SlideShare
Loading in …5
×

Node.js MQTT Client for Raspberry Pi 3

13,149 views

Published on

艾鍗教你從實作中認識物聯網!

http://bit.ly/2jZRwt2

課程使用Raspberry Pi結合ARM mbed Cloud來實現一個物聯網解決方案。你會了解M2M(Machine-to-Machine)網路協定,包含CoAP、MQTT、LWM2M等協定,並藉由Raspberry Pi連接 Cloud。 Raspberry Pi的部份教你連接一些感測器,包含GPIO、數位界面I2C的溫溼度感測器、類比感測器如光感應器等,並將這些感測器成為定義為不同的Resource Path並註冊在mbed cloud中。
本課程將採用Node.js撰寫WebAPP,使用HTTP/RESTful API存取Resource。在實作WebAPP中,除了後端Node.js,你也將會看到後端如何與前端瀏覽器之間要如何溝通的方式,如AJAX或WebSocket

Published in: Engineering
  • Be the first to comment

Node.js MQTT Client for Raspberry Pi 3

  1. 1. Lab: Node.js MQTT Client
  2. 2. Lab for MQTT cd mqtt_test; npm install node mqtt_test.js MQTT Broker Raspberry Pi Web Server (Node.js )Publish {"x":0,"y":512,"z":16384} Browser G-Sensor (LIS3DH)
  3. 3. Run G-sensor app on Raspberry Pi cd LIS3DH ; ./build.sh ./GSensor
  4. 4. 方位 X>0 朝正面 Z>0 Y>0
  5. 5. MQTT Demo
  6. 6. References https://github.com/mqttjs/MQTT.js
  7. 7. https://goo.gl/8ZQ39e
  8. 8. https://goo.gl/McM4sy

×