Professional Documents
Culture Documents
Declaration
The assignment submitted herewith is a result of my own investigations and that I have
conformed to the guidelines against plagiarism as laid out in the Student Handbook. All
sections of the text and results, which have been obtained from other sources, are fully
referenced. I understand that cheating and plagiarism constitute a breach of University
regulations and will be dealt with accordingly.
Signature of the Subject Leader and date Signature of the Reviewer and date
ii
Faculty of Engineering and Technology
Ramaiah University of Applied Sciences
Department Electronics and Communication Programme B.Tech.
Engineering
Semester/Ba tch 4 / 2018
Course Code 19ECC214A Course Title Microprocessors and Microcontrollers
Assignment
Marks
Total Assignment
25
Marks
Marks (Max 25 )
Please note:
Assignment 01
Instructions to students:
3. The assignment has to be neatly word processed as per the prescribed format.
7. IMPORTANT: It is essential that all the sources used in preparation of the assignment
must be suitably referenced in the text.
8. Marks will be awarded only to the sections and subsections clearly indicated as per the
problem statement/exercise/question
Preamble
This course deals with the principles of Microprocessors and Microcontrollers. This subject
facilitates the students to understand the concepts of architecture and operation of
Microprocessors and Microcontrollers. Students are taught to program Microprocessors and
Micro-controllers to realize the given functionality. Students are trained to solve practical
problems involving interfacing of microprocessors and controllers with the external
peripherals.
<Subject Title> iv
A 1.3 Validate the program using Arduino IDE.
A 1.4 Interface input and output peripherals with Arduino board.
A 1.5 Implement and demonstrate the application on Arduino board.
<Subject Title> v
7 Health Temperature sensor, Body parameters will be checked
monitoring Humidity sensor, and compared with a fixed
system Heart rate, LCD, threshold
Buzzer range. Buzzer will indicate the
body parameters beyond threshold
range.
8 Automatic AC Temperature sensor, Based on the number of people in
Temperature Humidity sensor, the room and temperature or
control PIR humidity
Sensor, LCD, Buzzer variations, AC temperature will be
adjusted. Buzzer can be used to
indicate if temperature goes below
or
above than the given range. Hence
can be used as fire alarm system
also.
9 Automatic Switches, Buzzer, An internal clock module will be
Alarm LCD created. Based on the choice of
System for class button controller will understand
and Examination if it is
normal class day, exam day or
leave day. Accordingly the buzzer
timings
will be adjusted. LCD will display
the running clock, day choice and
buzzer on indication.
10 Automatic Light detector, Using light the system detects if
Alarm Buzzer, Servo motor, person is awake or sleeping. If its
System for switches late night buzzer rings. Internal
sleeping and clock will also
waking up control the buzzer timing in
morning.
Servomotors can be used to detect
light from all directions. Buttons to
set the timing of alarm.
11 Sleep Temperature, light This system keeps record of the
Monitoring detector, Co2 sleep with the help of light
System detector, condition, co2
LCD and temperature. LCD will show
how
much time person has slept in 24
hrs and based on that some
sleeping suggestions can be made.
<Subject Title> vi
12 Automatic IR sensor, Keypad, Vending machine dispenses a
Vending Motors, buzzer, LCD single item, when money is
Machine detected right by
IR sensor, and cost of number of
items matches. Motors can be used
to
demonstrate working of machine.
Buzzer for completion of
dispensing and LCD for cost of
items requested
13 Numerology Keypad, LCD, servo Based on DDMMYYYY data,
based motor, buzzer destiny number can be calculated.
Personality And the
wheel servo motor will turn the pointer
to the section of wheel, where the
personality related to that number
is shown.
14 Real time clock RTC Clock module, Alarm using RTC clock module
LCD, Switches,
Buzeer
Software requirements:
Project equipment:
Following are the key components which will be used for our project:
<Subject Title> ix
and its low power consumption allow for the implementation in battery-
powered devices.
4. 1.44” ST7735 series TFT LCD screen: It is used for the display of our
output.
Block Diagram:
ALGORITHM:
<Subject Title> x
IV. Initialize a ST7735S chip and set the background black.
V. Draw horizontal separation line at position (0, 15).
VI. Read temperature, humidity and pressure from the BMP280 sensor.
VII. Print temperature from BMP-280 sensor and print the Celsius symbol.
VIII. Set the value approximation and print the percentage symbol.
IX. Print humidity from DHT-11 sensor and move cursor to position (75,74)
pixel.
X. Print atmospheric pressure from BMP-280 and move cursor to
position (91,112) pixel.
XI. Print unit of atmospheric pressure as hector .
XII. Delay the program by 1 second before taking the next sensor.
XIII. Display the required output with the help of a ST7735 LCD.
Code:
#include <SPI.h> //include Serial Peripheral Interface library
#include <Wire.h> //include Two Wire Interface library
#include <Adafruit_GFX.h> // include Adafruit graphics library
#include <Adafruit_ST7735.h> // include Adafruit ST7735 TFT library
#include <Adafruit_BMP280.h> // include Adafruit BMP280 sensor library
#include "DHT.h" //include DHTXX sensor library
#define DHTPIN 2 //DHT11 data pin connected to arduino pin D2
#define DHTTYPE DHT11 //specifying the type of DHT sensor used
#define TFT_RST 8 // TFT RST pin is connected to arduino pin D8
#define TFT_CS 10 // TFT CS pin is connected to arduino pin D9
#define TFT_DC 9 // TFT DC pin is connected to arduino pin D10
// initialize ST7735 SERIES TFT library
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
// define device I2C address: 0x76 or 0x77 (0x77 is the library default address)
#define BMP280_I2C_ADDRESS 0x76
void setup(void)
{
dht.begin(); // synchronizing DHT sensor
tft.initR(INITR_144GREENTAB); // initialize a ST7735S chip, black
tab
tft.fillScreen(ST77XX_BLACK); // setting black background
tft.drawFastHLine(0, 15 , tft.width(), ST77XX_CYAN);// draw horizontal
seperation line at position (0, 15)
<Subject Title> xi
tft.setTextColor(ST77XX_CYAN, ST77XX_BLACK); // set text color to white
and black background
tft.setTextSize(1); // setting text size to 1
//tft.setCursor(4, 0); // move cursor to position (4, 0) pixel
//tft.print("ARDUINO + ST7735 TFT");
tft.setCursor(25, 5); // move cursor to position (25, 5) pixel
tft.print("WEATHER BUDDY");
char _buffer[8];
// read temperature, humidity and pressure from the BMP280 sensor
float temp = bmp280.readTemperature(); // get temperature in °C
float hum = dht.readHumidity(); // get humidity in rH%
float pres = bmp280.readPressure(); // get pressure in hPa
Output:
/home/builder/opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware
/home/builder/opt/arduino-builder/hardware -hardware /home/builder/.arduino15/packages -tools
/home/builder/opt/arduino-builder/tools -tools /home/builder/.arduino15/packages -built-in-libraries
/home/builder/opt/libraries/latest -logger humantags -fqbn arduino:avr:uno -build-cache /tmp -build-path
/tmp/466184284/build -verbose -prefs
runtime.tools.arduinoOTA.path=/home/builder/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -
prefs runtime.tools.avr-gcc.path=/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-
atmel3.6.1-arduino5 -prefs
runtime.tools.avrdude.path=/home/builder/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -
prefs runtime.tools.arc-elf32.path=/home/builder/.arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1 -
prefs runtime.tools.core2-32-poky-linux.path=/home/builder/.arduino15/packages/Intel/tools/core2-32-
poky-linux/1.6.2+1.0 -prefs
runtime.tools.linuxuploader.path=/home/builder/.arduino15/packages/arduino/tools/linuxuploader/1.5.1 -
prefs runtime.tools.CMSIS-Atmel.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS-
Atmel/1.2.0 -prefs runtime.tools.xtensa-lx106-elf-
gcc.path=/home/builder/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9 -prefs
runtime.tools.openocd.path=/home/builder/.arduino15/packages/Intel/tools/openocd/0.9.0+0.1 -prefs
runtime.tools.arm-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-linux-gcc/4.9.3 -
prefs runtime.tools.nrf5x-cl-tools.path=/home/builder/.arduino15/packages/arduino/tools/nrf5x-cl-
tools/9.3.1 -prefs
runtime.tools.esptool.path=/home/builder/.arduino15/packages/esp8266/tools/esptool/2.5.0-3-20ed2b9 -
prefs runtime.tools.mkspiffs.path=/home/builder/.arduino15/packages/esp8266/tools/mkspiffs/2.5.0-3-
20ed2b9 -prefs runtime.tools.dfu-util.path=/home/builder/.arduino15/packages/arduino/tools/dfu-
util/0.9.0-arduino1 -prefs
runtime.tools.CMSIS.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS/4.5.0 -prefs
runtime.tools.bossac.path=/home/builder/.arduino15/packages/industruino/tools/bossac/1.7.0-
industruino -prefs runtime.tools.arm-none-eabi-
gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs
runtime.tools.sketchUploader.path=/home/builder/.arduino15/packages/Intel/tools/sketchUploader/1.6.2
+1.0 -prefs runtime.tools.x86-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/x86-linux-
gcc/7.2.0 -prefs
runtime.tools.arduino101load.path=/home/builder/.arduino15/packages/Intel/tools/arduino101load/2.0.1
-prefs runtime.tools.flashpack.path=/home/builder/.arduino15/packages/Intel/tools/flashpack/2.0.0 -prefs
Sketch uses 22524 bytes (69%) of program storage space. Maximum is 32256 bytes.
Global variables use 737 bytes (35%) of dynamic memory, leaving 1311 bytes for local variables.
Maximum is 2048 bytes.
Conclusion
In conclusion it can be said that this project is quite economical and a handy
weather station that fits right in your pocket.
<Subject Title> xv
COURSE
CERTIFICATE
05/22/2020
Abhiraman S
N FO R E V
IO E
has successfully completed T
R
CA
YO
E DU
Introduction to the Internet of Things and
NE
Embedded Systems
TE
CO
an online non-credit course authorized by University of California, Irvine and offered
A
R
U
through Coursera S
C
E I
F
CERTI
Ian Harris
Professor
Department of Computer Science
Verify at coursera.org/verify/YMGFVDAUWBSB
Coursera has confirmed the identity of this individual and
their participation in the course.
COURSE
CERTIFICATE
05/22/2020
Abhiraman S
N FO R E V
IO E
has successfully completed T
R
CA
YO
E DU
The Arduino Platform and C Programming
NE
an online non-credit course authorized by University of California, Irvine and offered
TE
CO
through Coursera
A
R
U
S
C
E I
F
CERTI
Ian Harris
Professor
Department of Computer Science
Verify at coursera.org/verify/W3S5UWTDBKGJ
Coursera has confirmed the identity of this individual and
their participation in the course.
COURSE
CERTIFICATE
05/27/2020
Abhiraman S
N FO R E V
IO E
has successfully completed T
R
CA
YO
E DU
Interfacing with the Arduino
NE
an online non-credit course authorized by University of California, Irvine and offered
TE
CO
through Coursera
A
R
U
S
C
E I
F
CERTI
Ian Harris
Professor
Department of Computer Science
Verify at coursera.org/verify/N46FHZS85S4E
Coursera has confirmed the identity of this individual and
their participation in the course.