Updated 02 December 2018


                                      THIS WEBSITE/DOMAIN IS FOR SALE


Email:  restomaguio@yahoo.com

Kits and Gadgets Inc.
FARWANIYA, Farwaniya, 80003
Kuwait

ph: +965 67060813

kits@kits-gadgets.com

  • Home
  • Electronic Kits
  • Parts on Sale
  • Parts in StockClick to open the Parts in Stock menu
    • Resistor
    • Potentiometer
    • Capacitor
    • Trimmer Capacitor
    • Transistor
    • Crystal
    • Diode
    • LED
    • Diac
    • Thyristor
    • IC Socket
    • IC - Logic
    • IC - Linear
    • IC - Op-Amp
    • IC - VLSI
    • Relay
    • Motor
    • Lamp
    • Transducer
    • Gear
    • Switch
    • Heatsink
    • Parts Store Inventory
  • Brand New Items
  • Used Items
  • Power Supply
  • Raspberry Pi VaultClick to open the Raspberry Pi Vault menu
    • The P1 Header Guide
    • BBC BASIC Tutorials
    • Activating the GPIO
    • LED Program
    • Motor Program
    • Solenoid Program
    • Stepper Motor
    • 8 Relay Program
    • GPIO as Input
    • Motors and Sensors Connection Diagram
    • Autonomous Program
    • Infrared Sensor
    • Ultrasonic Sensor
    • Camera Controller
    • PWM Program
    • Robotic Arm
    • STRYDER Robot
    • Demo Kit Program
  • Arduino VaultClick to open the Arduino Vault menu
    • Stepper Motor w/ LED
    • DCMotor
  • NodeMCU ProjectsClick to open the NodeMCU Projects menu
    • Running 8 LEDs
    • 8 LEDs and ULN2803
    • 8 LED Active Modes
    • ON-OFF Switch
    • Switch, Relay and LEDs
    • Motor Drive Interface
    • Connecting to Wi-Fi
    • IR Sensor
  • More GPIOsClick to open the More GPIOs menu
    • Accessing the P5 GPIOs
  • Prototypes
  • Computer Parts
  • Picture GalleryClick to open the Picture Gallery menu
    • Other Prototypes
    • Revived HP Laptop
    • Dismantled Helicopter
    • Dismantled Phone
    • ACER Laptop Repair
    • Revived Laptop
    • Inside of Electric Drill
    • Video Cam Automation
    • My Tours and Travels
  • My Original DesignClick to open the My Original Design menu
    • Handycam Automation
    • Autonomous Robot
  • What's New!Click to open the What's New! menu
    • Article-1
    • Article-2
    • Article-3
    • Article-4
    • Article-5
    • Article-6
    • Article-7
    • Article-8
    • Article-9
    • Article-10
    • Article-11
    • Article-12
    • Article-13
    • Article-14
    • Article-15
    • Article-16
    • Article-17
    • Article-18
    • Article-19
    • Article-20
    • Article-21
    • Article-22
    • Article-23
    • Article-24
    • Article-25
    • Article-26
    • Article-27
    • Article-28
    • Article-29
    • Article-30
    • Article-31
  • Forum
  • Video GalleryClick to open the Video Gallery menu
    • IR Proximity Sensor
    • Robot Vacuum Cleaner
    • Robotic Arm - RPi
    • Raspberry Pi Demo Kit
  • About Us
  • Contact Us

Running 8 LEDs

       The schematic diagram below is a simple circuit on how to connect an LED to NodeMCU. As shown in the diagram, the anodes are connected to positive line or B+ but by reversing the LED connection to the resistor, it is possible to get the same result provided that the cathode of the LEDs are connected to the GROUND terminal instead of the B+ terminal. 

However, in such case, a minor modification of the program is needed to have the same effect. In the program,  the command  to put the  GPIO terminals to LOW state is initiated to activate each LED since the LED anode terminal is connected to the positive rail. 

So, instead of LOW command, it should be HIGH (as shown) if the LEDs are connected in reverse way or all cathodes connected to the GROUND.

 

  MODIFIED PROGRAM:

  digitalWrite(05, HIGH);   // turn the LED on (LOW is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(05, LOW);    // turn the LED off by making the voltage LOW
  delay(100);              // wait for a second


 

 DIAGRAM

 

 

PROGRAM

 

/*
  Experiment No.4

  By: Rolando Estomaguio
        Radar Specialist - Electronics Engineer
        http://www.kits-gadgets.com

  Objective: To learn the operation of WeMOS NodeMCU and utilize its full functionality.
 
  Title:  Running 8 LEDs
 
  Description:  Turns ON & OFF 8 LED in sequence repeatedly.
 */


// The 8 LED runs continuously with interval depending on the value of delay.
 

void setup() {
 
  // initialize digital pin 5, 4, 0, 2, 14, 12, 13 and 15 as an output.


  pinMode(05, OUTPUT);
  pinMode(04, OUTPUT);
  pinMode(00, OUTPUT);
  pinMode(02, OUTPUT);
  pinMode(14, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
  pinMode(15, OUTPUT);

}

// the loop function runs over and over again forever

void loop() {
 
  digitalWrite(05, LOW);   // turn the LED on (LOW is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(05, HIGH);    // turn the LED off by making the voltage HIGH
  delay(100);              // wait for a second

  digitalWrite(04, LOW);   // turn the LED on (LOW is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(04, HIGH);    // turn the LED off by making the voltage HIGH

  delay(100);              // wait for a second
 
  digitalWrite(00, LOW);   // turn the LED on (LOW is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(00, HIGH);    // turn the LED off by making the voltage HIGH
  delay(100);              // wait for a second

  digitalWrite(02, LOW);   // turn the LED on (LOW is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(02, HIGH);    // turn the LED off by making the voltage HIGH
  delay(100);              // wait for a second

  digitalWrite(14, LOW);   // turn the LED on (LOW is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(14, HIGH);    // turn the LED off by making the voltage HIGH
  delay(100);              // wait for a second

  digitalWrite(12, LOW);   // turn the LED on (LOW is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(12, HIGH);    // turn the LED off by making the voltage HIGH
  delay(100);              // wait for a second

  digitalWrite(13, LOW);   // turn the LED on (LOW is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(13, HIGH);    // turn the LED off by making the voltage HIGH
  delay(100);              // wait for a second

  digitalWrite(15, LOW);   // turn the LED on (LOW is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(15, HIGH);    // turn the LED off by making the voltage HIGH
  delay(100);              // wait for a second
 
}



 

 

 

 

 

 

 

 

Copyright 2013 Kits and Gadgets Electronics Inc. All rights reserved.

Web Hosting by Yahoo

Kits and Gadgets Inc.
FARWANIYA, Farwaniya, 80003
Kuwait

ph: +965 67060813

kits@kits-gadgets.com