MQTT bright flashing lights based on Seeed BeagleBone Green series

61392Published On Aug 16,2016 18:30 PMshare2
Originally written from MOP



< Objective >
BB series pre installed a complete Cloud9 development using IDE can do, this is a practical use of this IDE to write an MQTT for convenient bright flashing lights, MQTT is mainly used in M2M communication in the Internet of things, instead of the traditional disadvantage of TCP/IP packets, this Protocol is widely used in the Internet of things, this use of node.js implements


< Prepare >
1. the MicroUSB transmission line
2. RJ45 network cable
3. the BBG Board


1. what MQTT is? Message Queuing Telemetry Transport for IBM and Eurotech developed common transport protocol, which was designed for Internet, significantly reduces the Head size of a TCP/IP packet, occupied bandwidth is reduced, and therefore also reduces the demand for hardware, this agreement through the Publish and Subscribe to message


2. using the method is very simple, you have to know Publisher,Subscriber and Topic in the Broker (Server), concept pictured below
Topic Entry on which the Publisher sends data to Broker, and register to receive Topic Subscriber to the Broker the Entry of data


In general we will read sensor data on the Board, and would send through the MQTT Broker, another piece of the Development Board can be read from a specific Topic to the sensor data, and to make the corresponding control or functions, therefore up to Machine to Machine (M2M) concept

Begin

connect to the internet

install npm

NPM Kit tools to examine the structure tree package updates,

Install the MQTT node.js library

Create a new file

save and run

Watch the output message, and LED flashing random phenomena

replace broker

summary

Comment

James
Followers20
Projects98
Components
SeeedStudio BeagleBone Green
$44.00 Add To Cart
SeeedStudio BeagleBone Green Wireless
$52.90 Add To Cart
Seeed Studio BeagleBone Green Wireless IOT Developer Prototyping Kit for Google Cloud Platform
$99.00 Add To Cart
Fusion PCB
$9.90 Add To Cart
Fusion PCBA
$10.00 Add To Cart
Add All To Cart
Related Recipes
Popular Recipes