วันอังคารที่ 7 มีนาคม พ.ศ. 2560

Raspberry Pi IoT connect CloudMQTT

Raspberry Pi IoT connect CloudMQTT

In Last Article we have made raspberry pi with dht sensor and OLED display. So, in this blog we will use that hardware to connect CloudMQTT.com for IoT application.

What is MQTT?

MQTT (aka MQ Telemetry Transport) is a machine-to-machine or “Internet of Things” connectivity protocol on top of TCP/IP. It allows extremely lightweight publish/subscribe messaging transport.


Broker , Publisher , Subscriber

CloudMQTT are managed Mosquitto servers in the cloud. Mosquitto implements the MQ Telemetry Transport protocol, MQTT, which provides lightweight methods of carrying out messaging using a publish/subscribe message queueing model.
So , you must sign up CloudMQTT

System Diagram

Hardware

  • Raspberry Pi Board ( we use Raspberry Pi3 board ) + SD card (8GB or more) we use 16 GB
  • DHT11 Temperature and Humidity Sensor with Resistor 4.7 K Ohm
  • I2C OLED Display ( 128 x 64 0.96' SSD1306 chip )

Wiring Diagram
Python Library

DHT Sensor
$ git clone https://github.com/adafruit/Adafruit_Python_DHT.git
$ cd Adafruit_Python_DHT
$ sudo apt-get install build-essential python-dev python-openssl
$ sudo python setup.py install

OLED
$ git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
$ cd Adafruit_Python_SSD1306
$ sudo python setup.py install


Source Code
https://github.com/amphancm/RaspberryPi_CloudMQTT
Reference
CloudMQTT Document https://www.cloudmqtt.com/docs.html
OLED Adafruit Python Library https://github.com/adafruit/Adafruit_Python_SSD1306



My Website
email : info@softpowergroup.net   Tel .081-6452400

Android and Arduino IoT



LINE : adunfong
FaceBook : https://www.facebook.com/adun.nantakaew
email: amphancm@gmail.com

วันพุธที่ 1 มีนาคม พ.ศ. 2560

Raspberry Pi + DHT Sensor and OLED in python code


Raspberry Pi + DHT Sensor and OLED in python code

Last Article we connect raspberry pi with OLED already. ( Raspberry pi OLED )
Now we want to connect some sensor and show on OLED.So we use famous one .It is DHTxx Sensor .it can measure temperature and humidity in one time ( air only ).

Wiring Diagram

Hardware


  • Raspberry Pi Board ( we use Raspberry Pi3 board )
  • DHT11 Temperature and Humidity Sensor with Resistor 4.7 K Ohm
  • I2C OLED Display ( 128 x 64 0.96' SSD1306 chip )

Install DHT Python Library

$  sudo apt-get install build-essential python-dev python-openssl
$  git clone https://github.com/adafruit/Adafruit_Python_DHT.git
$  cd Adafruit_Python_DHT
$  sudo python setup.py install


Source Code in python on Github
https://github.com/amphancm/RaspberryPi_DHT_OLED




Reference Original Code




My Website
email : info@softpowergroup.net   Tel .081-6452400

Android and Arduino IoT



LINE : adunfong
FaceBook : https://www.facebook.com/adun.nantakaew
email: amphancm@gmail.com