Showing posts with label xbee. Show all posts
Showing posts with label xbee. Show all posts

Thursday, November 19, 2015

Arduino board in India


It’s my blog in which we are going to use a gas alarm. In this system when pollution is detect user got a message.

arduino-board-in-india

Step 1: Materials Required

(2) GSM shield.
(3) Jumper Cables
(4) 10K Resistor
(5) Breadboard
(6) MQ 135 gas sensor

Step 2: How to make connection between GSM shield and Arduino:-

Firstly we have to connect the transmitter part of GSM module to the pin 2 of arduino and receiver part and make both part ground.and don’t forget to give the power to the GSM shield with a 12V when our device is active.


Step 3: Making Connections between sensor and Arduino:-

Make connections and Treat the Side of Sensor With"Mq135" Written As To and choose analog pin A0.

arduino-board-in-india


Step 4: The Time of test:-

Firstly we will run code attached so that we can see readings of sensor in normal and polluted environment on serial monitor.

int mqx_analogPin = A0; // connected to the output pin of MQ-X

void setup(){
  Serial.begin(9600); // open serial at 9600 bps
}

void loop()
{
  // give ample warmup time for readings to stabilize

  int mqx_value = analogRead(mqx_analogPin);
  Serial.println(mqx_value);

  delay(100); //Just here to slow down the output.
}



Step 5: Final testing

1.    Use the noted values to edit the final code attached and to change the cellphone number in code and then write the code in arduino.
2.    Open serial monitor and wait
3.    serial monitor will show "status OK" and soon will send sms to the cellphone.

 #include "SIM900.h"
#include <SoftwareSerial.h>

//#include "inetGSM.h"


#include "sms.h"
SMSGSM sms;



int numdata;
int value;
boolean started=false;
char smsbuffer[160];
char n[20];
int PIN = A0;
int sensor = 450;

int LED1 = 11;

void setup()
{
 pinMode(LED1, OUTPUT);
  pinMode (PIN,INPUT);
  value = analogRead (PIN);
  Serial.begin(9600);
  Serial.println(value);
  Serial.println("GSM Shield testing.");

 if (value > sensor){
    digitalWrite(LED1, HIGH);
 }
 
  if (gsm.begin(2400)){
    Serial.println("\nstatus=READY");
    started=true; 
  }
  else Serial.println("\nstatus=IDLE");
  if (value > sensor){
    digitalWrite(LED1, HIGH);
  
   
   
    (sms.SendSMS("+919461022454", "RJ27 CB 3**9 Pollution Level Exceeding , Attention Required "));
      Serial.println("\nSMS sent OK");
  }

};


void loop()
{
  if(started){
   
    if(gsm.readSMS(smsbuffer, 160, n, 20))
    {
      Serial.println(n);
      Serial.println(smsbuffer);
    }
   
   
  }
};











Tuesday, November 17, 2015

ARDUINO BLUETOOTH CONTROL BY WINDOWS DEVICE

Its my first blog post that how can we manage arduino with Bluetooth. Its very fast apps that we are use in windows app store. I am using arduino Bluetooth bot you can use further module.
Windows: 8.1 & 10
I am using arduino Bluetooth bot you can use further module.


ARDUINO BLUETOOTH CONTROLLER PARTS




arduino-bluetooth-control-board


















Arduino-bluetooth-control-board
















Arduino-bluetooth-control-board
















Arduino Sketch & Upload


int led = 13; 

void setup()
{
      Serial.begin(9600);
      Serial.flush();
      pinMode(led, OUTPUT);  
}



 void loop()
 {  
   String command = "";
  
      while (Serial.available() > 0)
    {
        command +=  Serial.readString();
       delay(5);
}

    if (command == "on")
    {
        digitalWrite(led, HIGH);
    }
    else if (command == "off")
     {
         digitalWrite(led, LOW);
     }
 }



 Assembling of the project


Arduino-bluetooth-control-board

We are assemble this project with the matching wires.
You can use shorter wires to remove difficulty.
-------------------------------------
-------------------------------------
Bluetooth = Arduino Pin
BLL VCC = 5v or Vin (USB only power arduinos)
BL GND = GND
BL Rx = TX pin
BL Tx = Rx pin
-------------------------------------
-------------------------------------
 Component = Arduino Pin
Led + = 13 pin
Led - = GND
.We can use arduino led in place of normal led.

Bluetooth Pair and Search

Arduino-bluetooth-control-board


 1.We can install very fast app from windows store and to install this we need windows 8.0 &10.

2. Pair your device to your laptop.
The initial pair only has to be done one time.
Most passcodes are 1234 or 0000.

 3.Open Quick Terminal and search for your device. 

How It Works:-

Arduino-bluetooth-control-board


 When we send ON command in circuit, then the Led will glow and when we send OFF command then our Led will turn off.
We can use different  type of command to control the more things in Bluetooth control Arduino.

You can also visit this link: