The Code For Sending A Text Message

1795 words - 8 pages

3.4.4 GSM Shield library
GSM coding is significantly facilitated by using the GSM library. The library consists of a few header files and examples. The header files encompass AT commands to start up SIM900 and test the serial communications between Arduino and GSM. Moreover, several functions are integrated in the library to facilitate sending text messages, making phone calls and data transfer. It is worthwhile to note that two GSM libraries can be found on the internet, including GSM_Shield library and GSM-GPRS-GPS-Shield library. Both libraries have been tested in the project and it has been found out that the former is not functional. Therefore, the latter is used.
The GSM-GPRS shield ...view middle of the document...

After establishing serial communication, the GSM is started. It is worthwhile to point out that prior to starting up the GSM, the SIM900 has to be turned on by pressing the SIM900 power button on the shield. Otherwise, the program will get stock on “gsm.begin” and the system will not work. Another necessary condition for starting up the GSM is proving appropriate power source. If GSM starting is successful, it will return “1”and the message “status=ready” is printed on the serial monitor. Otherwise, status=IDLE is printed. The time consuming process of starting up the GSM is only conducted once after turning on the device.
#include "SIM900.h"
#include "sms.h"
boolean started=false;
void GSMset () {
//Serial connection.
Serial.println("GSM Shield testing.");
if (gsm.begin(2400)){
else Serial.println("\nstatus=IDLE");

The function SMSsend is called to send a text message. First of all, it is checked whether the GSM has started or not. If so, the command “sms.SendSMS” is used to send a text message. The script accepts two arguments: phone number and text message. If the sending is successful, warning message is printed on serial monitor.
void SMSsend (){
//Serial connection.
Serial.println("GSM Shield testing.");
if (sms.SendSMS("+61424251544", "Security Alarm"))
Serial.println("\nSMS sent OK");
It is noteworthy to mention some practical experiences here. The GSM shield is the most complex part of the system. Setting up GSM requires several AT commands and the program is prone to instability. From hardware standpoint, GSM requires stable power supply and dedicated communication pins. One problem that we faced during setting up the GSM shield was the confliction between LCD/keypad and GSM. The LCD uses pin 3 for adjusting the LCD contrast and GSM uses the same pin for communicating with Arduino. This issue was resolved by moving the LCD to the auxiliary box. Another possible solution is to use higher quality, more flexible GSM shield manufactured by Freetronics. Another issue is the confliction between GSM and Xbee in utilizing the serial port. This issue, however, does not result in any malfunction because the Xbee on main box operates as router (receiver) and GSM operates as sender of messages.
The PIR sensor code consists of PIR sensor setup and PIR sensor loop functions, as shown below. The PIRset initializes the pin corresponding to PIR as an input pin. It is worthwhile to mention that “inputPin” is defined as pin 32 in the beginning of the auxiliary box code. The command “pinMode” is used to set pin32 as input.
The PIRloop function is called in the main loop to check the status of PIR sensor. If an intruder is detected, the “inputPin” is changed to HIGH and the counter “piri” is incremented. when piri reaches 5, the function Trigsiren is called and piri...

Find Another Essay On The Code for Sending a Text Message

posters as an effective tool of they are still a potent way of sending message acros in educational institutes like Panjab Unuversity, chandigarh

2940 words - 12 pages designed to be both eye-catching and convey information. They may be used for many purposes. They have been used effectively by campaigners for a variety of purposes: To advertise, To motivate, To educate, To persuade, Tool of propagandists and protestors, To inform people of a cause, To convey action oriented messages. The ability of posters in sending a message across to as many people as possible makes them the

The Message Behind "A Poison Tree"

1250 words - 5 pages iambic tetrameter. The easy rhyme and clear, almost musical meter of the poem represents the confident tone and assertive nature of the speaker. The message behind A Poison Tree is powerful. If anger and wrath and hatred are stored up they will result in heavy consequences, which sometimes include death. The musical style of Blake’s poem, and his insightful symbols and allusions leads to a poem that is overall a metaphor for life and the human

Ernest Hemingway's Code Hero in For Who The Bell Tolls and A Farewell To Arms

4496 words - 18 pages , attempting to escape, a shell struck the horse. The horse crushed Jordan?s leg and the wound would cause his death. Throughout the text, Robert Jordan illustrates amazing characteristics typical of a code hero. Robert Jordan resists random impulses under extreme pressure at many points throughout For Whom The Bell Tolls. A particular instance is when Jordan avoids confrontation with Pablo despite being provoked. The two had heated confrontations

This Is A College Essay On The Code Of Ethics For Social Workers, Pros And Cons

828 words - 4 pages NASW Code of Ethics for social workers identifies each of these values as values for the professional by directly referencing social workers and their goals in each value.There is an explicit appeal for each of these values in that in the code under every value there is a brief statement about the specific principle value of the social worker stating the objective of social workers in general.The requirements outlined in the NASW Code of Ethics

The Ugly American: A Fictional Story with a Nonfictional Message

1536 words - 7 pages The Authors of The Ugly American, William J. Lederer and Eugene Burdick, wrote a fictional story, with fictional characters about a fictional country. The only thing that was not fictional was the message that they were trying to convey about what was wrong with America’s foreign policy. It is not a coincidence that their message directly correlates to the Special Operations (SO) Imperatives. I will discuss specific characters in The Ugly

The Ugly American: A Fictional Story with a Nonfictional Message

1463 words - 6 pages , the Abu Sayyaf Group (ASG) and Jemaah Islamiyah (JI) are a fraction of what they used to be. Their capabilities for planning, preparing and executing terrorist attacks have been significantly reduced as a result. Operating with and through the AFP allowed the United States to significantly reduce the terrorist threat posed by the ASG and JI to a partner nation and also to U.S. interests within the geographic area of the Pacific. The final SO

A Discussion of the Positive Message of the Human Spirit

683 words - 3 pages first sight is a true occurrence at those moments. Juliet has shown that even though they have barely known each other for maybe less than a couple of hours they are madly, and truly in love with each other no matter who they are. The next positive message about the human spirit is that the human spirit even if full of very bad or sad memories can forget and be in a state of true happiness. This is easily and most clearly shown in Act 3, scene 1

The Misconceptions of Hope in Economics and Finance: A Hidden Message of Hope for the Little Fish of a Brighter Economic Future

1949 words - 8 pages is; this cover of The Economist is exposing a hidden message of spirituality in economics and that “Little Fish” have looked for answers in the wrong places. It can also be argued that economists, analysts, and professionals within the field economics are the answer to a brighter economic future, yet If we are to consider that these professionals for the most part are either employed by banks, are associated with banks, politically

The Benefits of a Student Dress Code

1253 words - 5 pages Lab 2 Aaron Flores CSCI 1201.04 2/17/2014  Figure 1: School uniforms. CSCI 1201.04 Lab 2 Aaron Flores 2 School Uniform? All around the world, many schools ranging from elementary to high school enforce a dress code for the students. Many people everywhere, including parents and the students, disapprove of the use of uniforms for a number of reasons. At the same time, many school officials will argue of the

A Knight Has Cracked the Code

992 words - 4 pages -shape our entire life and flip it upside down. Sometimes these consequences can be harsh punishments such as serving jail time for example. Through these consequences no matter how difficult they may be to overcome a lesson can almost always be taught. In The Wife of Bath’s Tale by Geoffrey Chaucer a Knight who has raped a woman and now will suffer consequences such as death. He escapes these consequences with the order of the queen to find out

A Framework for Parallel Code Execution using Java

3795 words - 15 pages loads a Java class through client APIs of Code Migrator/Execution into the framework. The class is then converted into byte data. The generated byte data is sent to the Scheduler through JMS for its distribution over the cluster. Scheduler submits the received code to the cluster on the available machines. Each machine gets a copy of the code and starts its execution in parallel. The message passing between the machines is done through JMS which

Similar Essays

Look At A Breast Cancer Ad And Analyse The Message Its Sending To The Audience

903 words - 4 pages knows that early detection saves lives. It sends out a message of if women want to look young and health just like Jennifer Love Hewitt, go to the doctor to check for breast cancer. It also shows how people should not let the fear of dying hold them back from enjoying life. This ad is surrounded by being conscious of breast cancer and making sure that all women know that they need to take care of their bodies. It is trying to make women "tied to

Videos Sending The Wrong Message About Muslims Of The World

935 words - 4 pages , Muslim Women Are ‘Cool’”, Rabia Chaudry’s “Somewhere on the Internet, Muslim Women are being Shamed”, Aminah Sheikh’s “Why I Participated in the ‘Somewhere in America’ #Mipsterz Video”, and Yasmine Hafiz’s “Why Islam Needs More ‘Mipsterz’”. These articles cover the topic very well and offer the main arguments for both those for and against the video’s message. Those against the video’s message essentially argue that these women are not behaving in a

"Tomorrow When The War Began" By John Marsden: Courage As A Central Message In The Text

842 words - 3 pages In the novel 'Tomorrow when the war began', courage is the central message. The WordWeb dictionary defines courage as 'a quality of spirit that enables you to face danger of pain without showing fear'. This is exactly what John Marsden, the author, tried to make clear in the novel. The novel is about 7 teenagers that were forced to live in the bush because of the invaders that took over their country. Each of the characters came to a difficult

Brand Spaces: Using Space As A Medium For The Message

2755 words - 12 pages intend to share my ideas on the current social and political situation of retail by using local examples such as the extravagant yet powerful Selfridges flagship store in London by describing their methodologies used for a effective costumer experience in comparison to its competitors, their ethos towards the environment and how it relevant it became for the British economy. In this essay I will also share my opinion (as a costumer) on what