Hardware Programming
Structure of Arduino Programming
 The program has two main scope
one is declaration(setup) part and
another one is execution
part(loop).
 The variable declarations and
initialization of the serial
communications within this
part(setup). It executes only one
time.
 The executions parts(loop)
executes code continuously
 This scope used to read the sensor
input and triggers the outputs
LED Blinking
 In setup function, we
are initialize the LED
pin 13 to blink built-in
LED of Arduino board
Read the sensor input
 Choose any one of the pins of LDR to 5v of Arduino
board
 The LDR other pin connected to 1K Resistor to limit
the current flow inside the LDR
 The other terminal of resistor connected to ground.
The sensor output is taken from in-between the
resistor and LDR
Display the sensor value
 Initialize the analog pin(A0) in setup function
 Store the sensor value is integer to display in serial
monitor
Pin Configurations
 General-purpose input/output (GPIO) is a pin on an IC (Integrated Circuit).
 It can be either input pin or output pin, whose behavior can be controlled at
the run time.
Setup a NodeMcu Board
 In Arduino IDE, Go to file and select preferences the add
http://arduino.esp8266.com/stable/package_esp8266com_index.j
son for additional board manager
 Go to tools and visit manage libraries install the ESP8266
nodemcu libraries if it is not available in your libraries
 Select the NodeMcu ESP(0.9) 12E module in Arduino IDE Tools to
upload the programs into microcontroller
LED Blinking
 Connect LED +ve terminal to NodeMcu D0 pin
 Connect LED –ve pin to NodeMcu Ground pin
Read the sensor details using NodeMcu
Cont..
Store sensor data in mysql database
Cont..
Cont..
Cont..
Flask Applications
 Install Flask Application and Create Python_db and records table in mysql server
Cont…
Template for filtering the data
View the sensor data
Application View
Thank You…

Arduino & NodeMcu

  • 1.
  • 2.
    Structure of ArduinoProgramming  The program has two main scope one is declaration(setup) part and another one is execution part(loop).  The variable declarations and initialization of the serial communications within this part(setup). It executes only one time.  The executions parts(loop) executes code continuously  This scope used to read the sensor input and triggers the outputs
  • 3.
    LED Blinking  Insetup function, we are initialize the LED pin 13 to blink built-in LED of Arduino board
  • 4.
    Read the sensorinput  Choose any one of the pins of LDR to 5v of Arduino board  The LDR other pin connected to 1K Resistor to limit the current flow inside the LDR  The other terminal of resistor connected to ground. The sensor output is taken from in-between the resistor and LDR
  • 5.
    Display the sensorvalue  Initialize the analog pin(A0) in setup function  Store the sensor value is integer to display in serial monitor
  • 6.
    Pin Configurations  General-purposeinput/output (GPIO) is a pin on an IC (Integrated Circuit).  It can be either input pin or output pin, whose behavior can be controlled at the run time.
  • 7.
    Setup a NodeMcuBoard  In Arduino IDE, Go to file and select preferences the add http://arduino.esp8266.com/stable/package_esp8266com_index.j son for additional board manager  Go to tools and visit manage libraries install the ESP8266 nodemcu libraries if it is not available in your libraries  Select the NodeMcu ESP(0.9) 12E module in Arduino IDE Tools to upload the programs into microcontroller
  • 8.
    LED Blinking  ConnectLED +ve terminal to NodeMcu D0 pin  Connect LED –ve pin to NodeMcu Ground pin
  • 9.
    Read the sensordetails using NodeMcu
  • 10.
  • 11.
    Store sensor datain mysql database
  • 12.
  • 13.
  • 14.
  • 15.
    Flask Applications  InstallFlask Application and Create Python_db and records table in mysql server
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.