Title
- Industrial day
Wednesday, 14 June 2017
Thursday, 8 June 2017
Thursday, 1 June 2017
FYP 2 PROGRESS - WEEK 13
Title
- Final year project poster and submission of draft chapter 1,2 and 3
- Final year project poster and submission of draft chapter 1,2 and 3
Thursday, 25 May 2017
FYP 2 PROGRESS - WEEK 12
Title
-The project development (hardware)
-The project development (hardware)
Purpose
- complete the hardware and testing with software
Wednesday, 17 May 2017
FYP 2 PROGRESS - WEEK 11
Title
-The working code for gsm sim900a
#include<LiquidCrystal.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(12, 13);
LiquidCrystal lcd(6,7,8,9,10,11);
//int LED = 13;
const int pulse = 7;
float watt = 0.0, price = 0, unit = 0;
int pinState = 0 ;
unsigned int i=0, j=0, p=0;
unsigned long interval = 180000; //1000 1 sec - 60000 1 minutes - 3600000 1 hour
unsigned long intervalx = 10000; //1000 1 sec - 60000 1 minutes - 3600000 1 hour
unsigned long previousMillis = 0;
int sensorValue = 0; // variable to store the value coming from the sensor
int sensorPin = A0; // select the input pin for the potentiometer
int ledPin = 4; // select the pin for the LED
int light_sensitivity = 700;
void setup()
{
//pinMode(LED, OUTPUT);
pinMode(pulse, INPUT);
pinMode (ledPin, OUTPUT);
mySerial.begin(9600);
Serial.begin (9600);
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("WELCOME TO AUTO");
lcd.setCursor(0,1);
lcd.print("BILLING SYSTEM");
delay(2000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("GSM DINIE");
lcd.setCursor(0,1);
lcd.print(" START ");
delay(2000);
lcd.clear();
}
void loop()
{
unsigned long currentMillis = millis();
pinState = digitalRead(pulse);
if (pinState==HIGH)
{
//digitalWrite(LED, HIGH);
i++;
delay(200);
}
if(currentMillis-previousMillis >=interval)
{
j=1;
previousMillis=currentMillis;
}
if(j==1)
{
watt = (i*0.3125);
unit = watt/100;
price = unit*0.0218;
mySerial.begin(9600);
mySerial.print("\r");
delay(800);
mySerial.println("AT+CMGF=1/r");
delay(800);
mySerial.println("AT+CMGS=\"+60196907858\"\r");
delay(800);
mySerial.println("Unit");
delay(800);
mySerial.println(unit,6);
delay(800);
mySerial.println("Price");
delay(100);
mySerial.println(price,6);
delay(100);
mySerial.println("RM");
delay(10);
mySerial.write(0x1A);
delay(100);
j=0;
}
if(currentMillis-previousMillis >=intervalx)
{
p=1;
previousMillis=currentMillis;
}
if(p==1)
{
sensorValue = analogRead (sensorPin);
Serial.println (sensorValue, DEC);
if(sensorValue > light_sensitivity)
{
sensorValue = analogRead (sensorPin);
digitalWrite (ledPin, LOW);
Serial.println (sensorValue, DEC);
mySerial.begin(9600);
mySerial.print("\r");
delay(800);
mySerial.println("AT+CMGF=1/r");
delay(800);
mySerial.println("AT+CMGS=\"+60196907858\"\r");
delay(800);
mySerial.println("LAMPU ON ");
delay(800);
mySerial.write(0x1A);
delay(100);
p=0;
}
else
{
sensorValue = analogRead (sensorPin);
digitalWrite (ledPin, HIGH);
Serial.println (sensorValue, DEC);
p=0;
}
}
}
-The working code for gsm sim900a
Purpose
- generate and testing the code
Description
#include <SoftwareSerial.h>
SoftwareSerial mySerial(12, 13);
LiquidCrystal lcd(6,7,8,9,10,11);
//int LED = 13;
const int pulse = 7;
float watt = 0.0, price = 0, unit = 0;
int pinState = 0 ;
unsigned int i=0, j=0, p=0;
unsigned long interval = 180000; //1000 1 sec - 60000 1 minutes - 3600000 1 hour
unsigned long intervalx = 10000; //1000 1 sec - 60000 1 minutes - 3600000 1 hour
unsigned long previousMillis = 0;
int sensorValue = 0; // variable to store the value coming from the sensor
int sensorPin = A0; // select the input pin for the potentiometer
int ledPin = 4; // select the pin for the LED
int light_sensitivity = 700;
void setup()
{
//pinMode(LED, OUTPUT);
pinMode(pulse, INPUT);
pinMode (ledPin, OUTPUT);
mySerial.begin(9600);
Serial.begin (9600);
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("WELCOME TO AUTO");
lcd.setCursor(0,1);
lcd.print("BILLING SYSTEM");
delay(2000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("GSM DINIE");
lcd.setCursor(0,1);
lcd.print(" START ");
delay(2000);
lcd.clear();
}
void loop()
{
unsigned long currentMillis = millis();
pinState = digitalRead(pulse);
if (pinState==HIGH)
{
//digitalWrite(LED, HIGH);
i++;
delay(200);
}
if(currentMillis-previousMillis >=interval)
{
j=1;
previousMillis=currentMillis;
}
if(j==1)
{
watt = (i*0.3125);
unit = watt/100;
price = unit*0.0218;
mySerial.begin(9600);
mySerial.print("\r");
delay(800);
mySerial.println("AT+CMGF=1/r");
delay(800);
mySerial.println("AT+CMGS=\"+60196907858\"\r");
delay(800);
mySerial.println("Unit");
delay(800);
mySerial.println(unit,6);
delay(800);
mySerial.println("Price");
delay(100);
mySerial.println(price,6);
delay(100);
mySerial.println("RM");
delay(10);
mySerial.write(0x1A);
delay(100);
j=0;
}
if(currentMillis-previousMillis >=intervalx)
{
p=1;
previousMillis=currentMillis;
}
if(p==1)
{
sensorValue = analogRead (sensorPin);
Serial.println (sensorValue, DEC);
if(sensorValue > light_sensitivity)
{
sensorValue = analogRead (sensorPin);
digitalWrite (ledPin, LOW);
Serial.println (sensorValue, DEC);
mySerial.begin(9600);
mySerial.print("\r");
delay(800);
mySerial.println("AT+CMGF=1/r");
delay(800);
mySerial.println("AT+CMGS=\"+60196907858\"\r");
delay(800);
mySerial.println("LAMPU ON ");
delay(800);
mySerial.write(0x1A);
delay(100);
p=0;
}
else
{
sensorValue = analogRead (sensorPin);
digitalWrite (ledPin, HIGH);
Serial.println (sensorValue, DEC);
p=0;
}
}
}
Thursday, 11 May 2017
FYP 2 PROGRESS - WEEK 10
Title
- To test the daylight detection system ( photoresistor )
- To test the daylight detection system ( photoresistor )
Purpose
- To turned on two lamp when the photoresistor detect dark mode
Description
when the sensor detect no change in light/dark @ didnt meet the setup value of light intensity value.
when the sensor were close it using hand, the sensor detect value equal or above 700 light intensity and send signal to arduino to turned on the lamp ( night mode )
The lcd will display above result
Friday, 5 May 2017
FYP 2 PROGRESS - WEEK 9
Title
-Testing the load consuming power with gsm function
-Testing the load consuming power with gsm function
Purpose
- To get output from the gsm to telephone ( real power consuming ) in unit and total price
Subscribe to:
Posts (Atom)