Wire.H Arduino Library Download

Posted on by

F7H/UPQK/IN35NSTA/F7HUPQKIN35NSTA.MEDIUM.jpg' alt='Wire.H Arduino Library Download' title='Wire.H Arduino Library Download' />Automatic Call answering Machine using Arduino and GSM Module. In todays modern world we all depend on mobile phones as our primary means of wireless communication. But, we all have faced situations during which we might not be able to answer to our calls, these calls might be an important personal call or a life changing business call and you could have just missed that opportunity since you were not able to answer that call at that particular time. This project aims to solve this problem by creating an Automatic Call answering Machine by using Arduino and GSM module. Next time when you are changing to a new phone number or out for a long pilgrimage trip or enjoying a well deserved vacation just use this machine to record your voice stating the reason for absence and all your calls will be automatically answered by this machine and your recorded voice will be played to them. This can also be used for your business numbers to answer to your customers calls during non office hours. Sounds interesting rightWire.H Arduino Library DownloadSo let us build it. Materials Required The project might sound a bit complicated but it is really easy to build, you just need the following components. Arduino Uno. GSM module Flyscale SIM 9. ISD 1. 82. 0 Voice Module. V adapter to power GSM module. I recently purchased a Arduino DeadOn RTC DS3234 breakout board. Initially i was planning to use this as a more accurate. This project builds an Arduino and GSM module based automatic call answering machine which will pick your call and answer a prerecorded message to the caller. IMPORTANT Note 3122015 the IRRemote library will not work with newer versions of the Arduino program I had to download version 1. V battery to power Arduino. Connecting wires. Before we actually proceed into the project, let us get familiar with the GSM module and ISD 1. Voice Module. Fly Scale SIM9. GSM Module GSM modules are fascinating to use especially when our project requires remote access. These modules could make all actions that our normal mobile phone could do, like makingreceiving a call, sendingreceiving a SMS, connecting to internet using GPRS etc. You can also connect a normal microphone and speaker to this module and converse on your mobile calls. Here are some tutorials on them using different microcontroller As shown in below pic the GSM module comes with a USART adapter which can be directly interfaced to the computer by using a MAX2. Tx and Rx pins can be used to connect it to a Microcontroller. You can also notice the other pins like MIC, MIC, SP, SP etc where a microphone or a Speaker can be connected. The module can be powered by a 1. V adapter through a normal DC barrel jack. Insert your SIM card in the slot of the module and power it on, you should notice a power LED going ON. Now wait for a minute or so, and you should see a red or any other colour LED Flashing once for every 3 seconds. This means that your Module was capable to establish connection with your SIM card. Now you can proceed with connecting you module with Phone or any Microcontroller. ISD1. 82. 0 Voice module The ISD 1. Voice module is really a cool module that could spice up your Projects with Voice announcements. This module is capable of recording an Audio clip for 1. The module itself comes with a microphone and a speaker 8ohms 0. The module works on 5. V and can be powered using the berg sticks on the left. It also has three buttons at the bottom which are Rec. Play. E. button and Play. L. button respectively. You can record your voice by pressing the Rec. Play. E button. The Play. L will play the voice as long as you hold the button. When interfacing with a MCU, we can use the pins on the left. These pins are 3. V 5. V tolerable and hence can be directly driven by ArduinoESP8. In our project we are controlling the PLAYE pin using the D8 pin of our Arduino module. So that we can play the recorded voice when a call is detected and received by the GSM module. Circuit Diagram and Explanation The complete circuit diagram of this Automatic Voice Call answering Machine project is given above. As you can see the connections are really simple. We power the GSM module with a 1. V 1. A adapter and Arduino with 9. V battery, the ISD Voice module is powered by the 5. V pin of the Arduino. As we know we can record anything on our voice module by pressing the rec button and this will get played when P E is pressed, this audio has to be sent to the microphone of the GSM module. English Movie 100 Feet. So we connect the speaker pin of the Voice module to the microphone pin of the GSM module. Here, the Arduino and GSM module is connect serially, the Tx pin of Arduino is connected to pin 9 and Rx pin is connected pin 1. This will help the Arduino to listen to the GSM module. When a call arrives to the GSM module the Arduino will listen to it and ask the GSM module to answer the call. The Arduino makes sure that the call is active and then plays the recorded voice message on the voice module by making the pin 8 Connected to P E of voice module go high for 2. Programming your Arduino We know from the above paragraph what is the role of Arduino here is now let us take a look at the code which does the same. The complete Arduino code of the project is given at the bottom of this page, further here I have spilt the code into small junks to explain it. Before we precede any further install the GSM Library, kindly click on this Github GSM library link to download the library used in this project. You will get a zip file which has to be added to your Arduino library by Sketch Include Librarey Add. Zip file. The first three lines of the code shown below are used to include the library to our code. We use the serial library and wire library because we are not using the default Rx and Tx pins of the Arduino to communicate with GSM module. Seeed StudioGPRSSIM9. Software. Serial. Wire. h default library. We enable serial communication on pins 9 and 1. This is made possible by the software serial library that we included above. Software. Serial gprs9,1. TX,RXInside our setup function, we initialize the serial monitor at 9. GSM module is also initialized with 9. Baudrate. The pin 8 which triggers the voice is declared as output pin. Serial. begin9. 60. Serial monitor works on 9. GSM module works on 9. Mode8, OUTPUT pin to turn on Voice. Serial. printlnArduino Automatic Voice Machine. Next we have to create a function that could read and understand what the GSM module is saying through its Serial port. If we use simple serial read line like gprs. ASCII decimal values, this will make no sense to us. So the following function is used to convert these decimal values to strings by using string objects and then concatenate them to form a string. The final string value is stored in the variable Fdata, which is of type string and can be used to compare with any String values. Incoming. ifgprs. If GSM is saying something. Incomingch gprs. Listen to it and store in this variable. Incomingch 1. 0 Incomingch 1. If it says space 1. Newline 1. 3 it means it has completed one word. Serial. printlndata Fdata data data Print the word and clear the variable to start fresh. String newchar String charIncomingch convert the char to string by using string objects. After converting to string, do string concatenation. The following lines are used for debugging, with these debugger lines you can send any AT commands from the Serial monitor of Arduino to GSM and also see what is responses on the serial monitor. Serial. available Used for debugging. Serial. read Used for debugging. Used for debugging. As said earlier, the Arduino has to check if the GSM module is receiving any calls. This can be done by making the Arduino to check for RING because the GSM module will output RING in the event of a call according to the AT command list.