plz help me to make my college project
SOFTWARE AND HARDWARE TOOLS:
I. Software Tools:
· ARDUINO IDE
· Blynk app
. PROTIUS DESIGN TOOLS
Ii. Hardware Tools:
. ARDUINO UNO R3
· LCD DISPLAY
· BLUETOOTH hc05
· POWER SUPPLY
· GAS SENSOR
· TEMPERATURE SENSOR
· ALARM-BUZZER
· DC motor
. LED
Block Diagram
blynk app ->bluetooth->arduino uno-> 1. Gas sense and buzzer on , 2. temparature Display on LCD ,3.Motor 4. LED 5.light
program blynk skt.
sync physical buttom.
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
SoftwareSerial SerialBLE(10, 11); // RX, TX
// Set your LED and physical button pins here
const int ledPin = 7;
const int btnPin = 8;
BlynkTimer timer;
void checkPhysicalButton();
int ledState = LOW;
int btnState = HIGH;
// Every time we connect to the cloud...
BLYNK_CONNECTED() {
// Request the latest state from the server
Blynk.syncVirtual(V2);
// Alternatively, you could override server state using:
//Blynk.virtualWrite(V2, ledState);
}
// When App button is pushed - switch the state
BLYNK_WRITE(V2) {
ledState = param.asInt();
digitalWrite(ledPin, ledState);
}
void checkPhysicalButton()
{
if (digitalRead(btnPin) == LOW) {
// btnState is used to avoid sequential toggles
if (btnState != LOW) {
// Toggle LED state
ledState = !ledState;
digitalWrite(ledPin, ledState);
// Update Button Widget
Blynk.virtualWrite(V2, ledState);
}
btnState = LOW;
} else {
btnState = HIGH;
}
}
void setup()
{
// Debug console
Serial.begin(9600);
SerialBLE.begin(9600);
Blynk.begin(SerialBLE, auth);
Serial.println("Waiting for connections...");
pinMode(ledPin, OUTPUT);
pinMode(btnPin, INPUT_PULLUP);
digitalWrite(ledPin, ledState);
// Setup a function to be called every 100 ms
timer.setInterval(100L, checkPhysicalButton);
}
void loop()
{
Blynk.run();
timer.run();
}