Showing posts with label SdevElectronics. Show all posts
Showing posts with label SdevElectronics. Show all posts

TFT Touch Display Tutorial

In this Project, we will see about how to interface mcufriend 2.4" TFT Touch Display with Arduino.

Circuit Diagram:
Just Install TFT Touch Display Shield to Arduino

Steps to follow:
1) Interface Shield
     Interface the TFT Touch Display Shield in Your Arduino.
2) Library Installation
     Download and Install the three Libraries. Links are below.
3) Graphic Test
     Upload File > Examples > MCUFRIEND_kbv > graphictest_kbv.ino
     (Proceed to next step, if it is working good)
4) Touch Test
     Upload File > Examples > MCUFRIEND_kbv > Touch_shield_new.ino
     (If Paint works good, skip Calibration Step)
5)Calibration
     Upload File > Examples > MCUFRIEND_kbv > TouchScreen_Calibr_native.ino
     Open Serial Monitor, You'll receive calibration Values there.
     (Copy TFT ID, TFT pins, Calibration Values in Notepad)
6) Touch Test
     Upload File > Examples > MCUFRIEND_kbv > Touch_shield_new.ino
     (Change the Calibration Values and test it. If it works good, move to next step)
7) LED Test
     Connect an LED in Digital Pin 53 with 100 Ohm Resistor
     Upload File > Examples > MCUFRIEND_kbv > button_simple.ino
     (Add these 3 lines in appropriate place & Change Calibration Values)

Libraries Used:

Youtube Video Tutorial:




Download our official Android App in PlayStore. Click Here
You can get the all the required files (like Circuit Diagram, Arduino.ino file, Libraries Used, and others) for the project  in ZIP format and much more...

DS3231 RTC Tutorial

In this Project, we will see about how to interface DS3231 RTC Module with Arduino.

Circuit Diagram:

Arduino Code:
rtc_lcd_code.ino
//This Code is Developed by Sdev
//Follow Us Here : https://youtube.com/sdevelectronics

#include <DS3231.h>
#include <LiquidCrystal.h>

DS3231  rtc(SDA, SCL);
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

void setup() {
  rtc.begin();
  lcd.begin(16, 2);
}

void loop() {
  lcd.setCursor(0, 0);
  lcd.print("Time:  ");
  lcd.print(rtc.getTimeStr());

  lcd.setCursor(0, 1);
  lcd.print("Date: ");
  lcd.print(rtc.getDateStr());
  delay (1000);
}

rtc_led_control_code.ino
//This Code is Developed by Sdev
//Follow Us Here : https://youtube.com/sdevelectronics

#include <DS3231.h>
#include <LiquidCrystal.h>

DS3231  rtc(SDA, SCL);
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

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

void loop() {
  lcd.setCursor(0, 0);
  lcd.print("Time:  ");
  lcd.print(rtc.getTimeStr());
  lcd.setCursor(0, 1);
  lcd.print("Date: ");
  lcd.print(rtc.getDateStr());

  String current_time = rtc.getTimeStr();
  if (current_time.equals("02:29:00")) {
    digitalWrite(13, HIGH);
    delay(1000);
    digitalWrite(13, LOW);
  }
  delay (1000);
}

Library Used:

Youtube Video Tutorial:




Download our official Android App in PlayStore. Click Here
You can get the all the required files (like Circuit Diagram, Arduino.ino file, Libraries Used, and others) for the project  in ZIP format and much more...