Io T
Io T
Io T
○ Blynk......................................................................................................................8
○ Project 2 Display temperature chart and notifications if the temperature exceeds the
limit ..........................................................................................................................19
1
Node MCU Pin Configuration
Node MCU is board of Internet of Things (IoT) based ESP8266.
➢ Features:
• Arduino-like hardware IO.
• Event-driven API for network applications.
• 10 GPIO, D0-D10, PWM functionality, IIC and SPI communicaiton, 1-Wire
and ADC A0 etc. all in one board.
• Wifi networking (can be used as access point and/or station, host a
webserver), connect to internet to fetch or upload data.
• Excellent few system on board for Internet of Things (IoT) projects.
2
• The ESP8266 chip requires 3.3V power supply voltage. It should not be
powered with 5 volts like other arduino boards.
• NodeMCU can be connected to 5V using micro USB connector or Vin pin
available on board.
• The I/O pin of ESP8266 has input/output max 3.3V only, the pins are NOT
5V tolerant inputs.
3
4
Step3. Installing Node-MCU Board Via the Board Manager
5
Step4. Selecting Node-MCU Board
6
Step5. Ensure that you have selected the correct board as shown in below figure.
Also make sure that you have selected the appropriate COM port.
7
Blynk
Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi and
the likes over the Internet. It's a digital dashboard where you can build a graphic
interface for your project by simply dragging and dropping widgets. It's really
simple to set everything up and you'll start tinkering in less than 5 mins. Blynk is
not tied to some specific board or shield. Instead, it's supporting hardware of your
choice. Whether your Arduino or Raspberry Pi is linked to the Internet over Wi-Fi,
Ethernet or this new ESP8266 chip, Blynk will get you online and ready for the
Internet Of Your Things.
• Blynk App - allows to you create amazing interfaces for your projects using
various widgets we provide.
• Blynk Server - responsible for all the communications between the
smartphone and hardware. You can use our Blynk Cloud or run your private
Blynk server locally. It’s open-source, could easily handle thousands of
devices and can even be launched on a Raspberry Pi.
• Blynk Libraries - for all the popular hardware platforms - enable
communication with the server and process all the incoming and outcoming
commands.
Now imagine: every time you press a button in the Blynk app, the message travels
to space the Blynk Cloud, where it magically finds its way to your hardware. It
works the same in the opposite direction and everything happens in a blynk of an
eye. Blynk app can be downloaded from App Store, and you must have Blynk
library for programming Node-MCU on Arduino IDE later.
8
Create a New Account
Log in with your facebook or with your email account.
9
Create a New Project
1. Tap the plus symbol to create a new project.
2. Specify the project name, choose theme you want, then choose the device
used and the connection used. This project using Node-MCU and WiFi
connection.
3. Tap create
4. Go to project settings, choose your device, and tap email to get auth tokens
from blynk that required on Node-MCU programming.
10
CHECK YOUR EMAIL TO FIND MESSAGES THAT CONTAIN AUTH
CODE FROM BLYNK NOW!!
11
Other libraries required
Required installation of several libraries before starting the project, the mentioned
libraries can be installed through manage libraries, or download the mentioned
libraries from internet and manually install via the add.ZIP library menu. The
following libraries are required:
1. DallasTemperature.h
2. OneWire.h
3. blynk-library-master.zip
4. SimpleTimer.h
12
Project 1
Control the direction of 2 dc motor with ESP12E
motor driver
a. Joystick
13
ESP-12E Motor Shield is designed and developed by Shenzhen Doctors of
Intelligence & Technology (SZDOIT). This large current motor driven module can
compatible with ESP12E Dev Kit and NodeMCU. By using the overlap-plug design,
the motor shield can be directly plugged by ESP-12E Dev Kit and NodeMCU Lua
module.
This shield board is driven by the special excent large power full-bridge chip
L293DD from the famous Stmicroelectronics company, which can directly drive 2-
channels DC motors or one-channel stepper motor. The driven current can be
arrived at 1.2A. This board is generated with national layout, SMT ensuption, and
convenient installation.
In this motor shield board, the IO port of ESP-12E Dev Kit is used as the control
port. The logic chip configured inside can finish IC driven. Thus, the shield board
has four ports: D1, D2, D3, and D4, which are used as PWMA(motor A), PWMB
(motor B), DA (direction of motor A), and DB (direction of motor B), respectively.
In addition, this shield board has many pins, such as VIN, 3.3V, DIO, AIO, SDIO,
UART, SPI, RST, and EN, thus can conveniently connect all kinds of sensors (e.g.,
temperature and humidy, buzzer, light, relay sensor, etc.).
The board is developed by the humanized design with a power switch, and thus
user can control the on-off of power conveniently.
This motor shield board can be used to control directly the smart car
14
The motor power pins are labeled as A-, A+, B- and B+. The nodemcu and Arduino
GPIO is not mapped the same. If you try to use the D1 pin as io-pin 1 in Arduino
IDE it will not work.
15
Step 4. Set up program on IDE then upload program into Node-MCU
16
17
Step5. Set up Blynk App
B. Tap joystick, set up joystick settings like the picture below, then tap
triangle symbol to play your blynk project!!
18