ECE - 542L Exam 4 Course Outcome:: Rubrics
ECE - 542L Exam 4 Course Outcome:: Rubrics
ECE - 542L Exam 4 Course Outcome:: Rubrics
EXAM 4
Course Outcome:
Implement microcontroller based system using different levels of implementation.
Objective:
To be able to create a monitoring system using a microcontroller that will display the
acquired data in LCD from sensors.
Rubrics:
Functionality (50%)
- 50 if 100% functional base on what is required in the problem.
- 40 if 90% functional base on what is required in the problem.
- 30 if 80% functional base on what is required in the problem.
- 20 if 70% functional base on what is required in the problem.
- 10 if 60% and below functional base on what is required in the problem.
Schematic Diagram and Code (35%)
- 35 if all the needed components in the schematic are simplified which result to
a smaller but functional circuit as well as the code.
- 25 if the schematic is somehow simplified resulting to a larger circuit compared
to the simplified as well as the code.
- 15 if the schematic is not simplified at all as well as the code.
Complete Document (15%)
- 15 if the documents are complete.
- 10 if the documents are 70% complete.
- 5 if the submitted documents are less than 70% complete.
Conceptual Framework:
Source Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
const int bp0 = 0;
const int bp1 = 2;
const int sPin3 = 3;
int y=0;
int i=0;
float temp;
void setup() {
int x=0;
Serial.begin(9600);
analogReference(INTERNAL);
lcd.init();
lcd.backlight();
lcd.noBlink();
lcd.setCursor(0,0);
lcd.print("-MenuSelection-");
lcd.setCursor(0,1);
lcd.print(" by:Alcoriza");
//Selector
delay(2000);
lcd.clear();
lcd.setCursor(0,0);
lcd.blink();
lcd.print("1Temp Display");
lcd.setCursor(0,1);
lcd.print("2Counter Display");
//Navigator
pinMode(bp0, INPUT_PULLUP);
pinMode(bp1, INPUT_PULLUP);
pinMode(sPin3, INPUT_PULLUP);
//Blinking
lcd.setCursor(0,0);
lcd.noBlink();
delay(150);
lcd.blink();
delay(150);
}
void loop() {
bState0 = digitalRead(bp0);
bState1 = digitalRead(bp1);
Serial.println(bState0);
Serial.println(bState1);
delay(150);
if (bState1 == HIGH)
{
if(y==0){
tempread();
}
else if(y==1){
sense();
}
}
if (bState0 == LOW)
{
if (y==0)
{
lcd.setCursor(0,1);
delay(200);
y=1;
}
else if (y==1)
{
lcd.setCursor(0,0);
delay(200);
y=0;
}
}
}
void tempread(){
lcd.clear();
lcd.setCursor(0,0);
lcd.noBlink();
do{
//Temp
temp = analogRead(A1);
temp=temp*1100/(1024*10);
bState1 == LOW;
lcd.setCursor(0,0);
lcd.print(" -Temperature- ");
lcd.setCursor(5,1);
lcd.print(round(temp));
lcd.println("'C ");
delay(100);
//back
bState1 = digitalRead(bp1);
Serial.println(bState1);
delay(100);
if (bState1 == HIGH)
{
break;
delay(200);
}
}while(1);
goback();
}
void sense(){
int x=0;
lcd.clear();
lcd.setCursor(0,1);
lcd.print("-#of Passersby-");
lcd.noBlink();
lcd.setCursor(6,0);
lcd.print(i);
do{
int sPstate3= digitalRead(sPin3);
Serial.println(sPstate3);
delay(10);
if (sPstate3==LOW & x==0)
{
i++;
lcd.setCursor(6,0);
lcd.print(i);
delay(10);
x=1;
}
if(sPstate3==HIGH & x==1)
{
delay(10);
x=0;
}
bState1 == LOW;
//////back
bState1 = digitalRead(bp1);
Serial.println(bState1);
delay(100);
if (bState1 == HIGH)
{
break;
delay(200);
}
}while(1);
goback();
}
void goback(){
lcd.clear();
bState0 = LOW;
bState1 = LOW;
delay(50);
y=0;
lcd.setCursor(0,0);
lcd.print("1Temp Display");
lcd.setCursor(0,1);
lcd.print("2Counter Display");
lcd.setCursor(0,0);
lcd.noBlink();
delay(150);
lcd.blink();
delay(150);
loop();
Conclusions:
Utilizing an ArduinoUno microcontroller for this Menu selection, Temperature
display and Counter display optimizes the usefulness of this microcontroller. This kind
system may even be used in real-time applications especially for some malls and other
similar establishments like restaurants and such. This type of system is very convenient and
useful to our society.
The UNIVERSITY of MINDANAO
College of Engineering Education
ECE 542L
Microprocessor System
EXAM 4
Menu Selection
Score