Tuesday, July 30, 2019

Parking Project: Using multiple analog sensors

Instructables:

https://www.instructables.com/id/ESP8266-with-Multiple-Analog-Sensors/

Circuit:  https://crcit.net/c/8f90e6a2




Database:




Code:
https://snipit.io/lists/5265/16084

See file:  14-sendata-mux

Browser tests:
http://localhost/parking/setdata.php?a=1&b=1&c=1&d=1&e=1&f=1&g=1&h=1

http://localhost/parking/index.php

http://localhost/parking/setcmd.php?cmd=0

http://localhost/parking/getdata.php

Using CD4051:

https://www.lelong.com.my/cd-4051-stelectronics-210206620-2020-12-Sale-P.htm
http://synacorp.my/v3/en/

Friday, July 26, 2019

Udemy: Project 8 - Read Light Sensor

Description:
Reads light intensity from LDR and maps it to a range from 0 - 100

Parts:
1. NodeMCU x 1
2. LDR Sensor
3. Jumper wires x 3 (male to male)
4. Breadboard

https://crcit.net/c/bac8809c


Code:

Thursday, July 25, 2019

Udemy: Project 7 - Read Light Sensor Module

Description:
Reads light intensity. If it exceeds certain threshold, it displays 0, if there is no light, it displays 1 to Serial Monitor.

Parts:
1. NodeMCU x 1
2. LDR Sensor Module
3. Jumper wires x 3 (male to male)
4. Breadboard





Code:
https://snipit.io/lists/5265/15758

Ref:
Using Digital Pin:
https://tutorial.cytron.io/2017/07/10/getting-started-light-sensor-module-sn-light-mod/

Using Analog Pin:
https://www.instructables.com/id/LDR-Sensor-Module-Users-Manual-V10/

Tuesday, July 23, 2019

Udemy: Project 6 - Analog Read

Description:
This example shows you how to read analog input from the physical world using a potentiometer. A potentiometer is a simple mechanical device that provides a varying amount of resistance when its shaft is turned. By passing voltage through a potentiometer and into an analog input on your board, it is possible to measure the amount of resistance produced by a potentiometer (or pot for short) as an analog value. In this example you will monitor the state of your potentiometer after establishing serial communication between your Arduino or Genuino and your computer running the Arduino Software (IDE).

Note:
You can also use Serial Plotter

Parts:
1. NodeMCU x 1
2. Potentiometer x 1
3. Jumper wires x 3 (male to male)
4. Breadboard

Circuit:
https://crcit.net/c/fe9b46ed




Code:






Udemy: Project 5 - Digital Read

Description:
Read a switch, print the state out to the Serial Monitor

Parts:
1. NodeMCU
2. 10 kOhm resistor  x 1
3. push button switch  x 1
4. hookup wires (female to male) x 3
5. breadboard (half-size)


Circuit: https://crcit.net/c/4de4d6d9




Code:





Udemy: Project 4 - pwm fade led (Analog out)

Description: Demonstrates the use of analog output to fade an LED

Parts Required:
  1. NodeMCU (1)
  2. LED (1)
  3. 220 ohm resistor (1)
  4. jumper wire (1)
  5. breadboard (1)

Circuit:  https://crcit.net/c/d5f3db14






Sunday, July 21, 2019

Online Tutorials

Henry's Bench:

http://henrysbench.capnfatz.com/henrys-bench/arduino-projects-tips-and-more/arduino-esp8266-lolin-nodemcu-getting-started/

Robo India:

https://roboindia.com/tutorials/digital-output-nodemcu/

Instructables:

https://www.instructables.com/class/Internet-of-Things-Class/


Udemy: Projects 1 - 3

Some are based on Arduino IDE built-in tutorials:
https://www.arduino.cc/en/Tutorial/BuiltInExamples

All code is on https://snipit.io  under nodemcu list

Circuit is designed using:  https://www.circuit-diagram.org/editor/

1. Hello world Serial Monitor Output: 


2. Blink built in LED :

Select examples, basic, blink.
Modify builtin pin to D4

Code: https://snipit.io/lists/5265/15526

Ref:
Arduino Examples, 01.Basics, Blink
https://www.arduino.cc/en/Tutorial/Blink


3. Blink external LED (Digital Out) :

Description:
Demonstrates the use of digital output to blink an LED

Select examples, basic, blink.
Modify pin to D4

Parts Required:
  1. NodeMCU (1)
  2. LED (1)
  3. 220 ohm resistor (1)
  4. jumper wire (1)
  5. breadboard (1)

Circuit: https://crcit.net/c/d5f3db14





Code: https://snipit.io/lists/5265/15526

Ref:
Arduino Examples, 01.Basics, Blink
https://www.arduino.cc/en/Tutorial/Blink



UNUSED:

1. Read from Serial Monitor and control onboard LED:
    Code:  https://snipit.io/lists/5265/15464


2. NodeMCU Digital Output – LED Blinking (PWM)
   https://roboindia.com/tutorials/digital-output-nodemcu/