techvaler
Published © GPL3+

LCD display and LED lights Combo- GOT Inspired

Changing LED lights according to text displayed in the LCD display

BeginnerProtip5,658
LCD display and LED lights Combo- GOT Inspired

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
LED, Blue
LED, Blue
×4
LED, Yellow
LED, Yellow
×2
Resistor 220 ohm
Resistor 220 ohm
×3
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
USB-A to B Cable
USB-A to B Cable
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Fire and Ice

Code

Fire_and_Ice.ino

C/C++
/* 
 * Credits to all sources on Google and Youtube, acting as reference to this code below. This code is not 
 * TechValer's own creation. TechValer has referred to different projects and websites to 
 * find an easy code for beginners to get started with 16*2 LCD display, LEDs and Arduino.
 * TechValer does not claim this code to be its own. TechValer is greatly thankful for original 
 * creaters of this code and also all others who acted as reference. 
 */

/* 
 *  About TechValer
 *  
 *  What comes to mind when you think of tech...hmm, we're sure you're thinking of iPhone, 
 *  Alexa, Boston Dynamics robotic dog etc., at least that's what we would have thought of. 
 *  Our point here is, when you look inside this tech...you'll find weird boards with 
 *  components attached to it. This stuff is electronics and we at Techvaler deeply appreciate 
 *  this piece of tech. As the name suggests, we are Tech Enthusiasts who know the Worth and 
 *  Potential of these amazing tech stuff! So, check out our website techvaler.com 
 *  and Youtube channel: "Techcafe" to find out more.
 */

/*
 * Thanks to Drona Automations Pvt.Ltd for Sponsoring this project!
 */
 
#include <LiquidCrystal.h> 

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; //Define the pins
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  
  lcd.begin(16, 2); 
  pinMode(13, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(7, OUTPUT);
}

void loop() {
  
  lcd.clear(); // To clear LCD screen of any pre-text
  lcd.setCursor(2, 0); // '2' refers to column number and '0' refers to line number
  lcd.print("Fire and Ice"); // The text to be printed on LCD
  delay(2000); 
  digitalWrite(13, HIGH); //To turn ON LED
  delay(500); // No. of seconds the LED has to be ON. It is given in milliseconds. 1000 millisecond = 1 second
  digitalWrite(13, LOW); //To turn OFF LED   
  delay(500); // No. of seconds the LED has to be OFF. 

  digitalWrite(8, HIGH);   
  delay(500);
  digitalWrite(8, LOW);    
  delay(500);
 
  digitalWrite(13, HIGH);
  digitalWrite(8, HIGH);
  delay(2000);
  digitalWrite(13, LOW);
  digitalWrite(8, LOW);

  lcd.clear();
  
  lcd.setCursor(3, 0);
  lcd.print("The North");
  lcd.setCursor(3, 1);
  lcd.print("Remembers!");
  delay(1000);
  
  digitalWrite(8, HIGH);
  digitalWrite(7, HIGH);
  delay(2000);
  digitalWrite(8, LOW);
  digitalWrite(7, LOW);
  delay(500);
}

Credits

techvaler

techvaler

0 projects • 1 follower

Comments