Question

In: Electrical Engineering

I have a sim 808 (fona 808) breakout connected to an adruino uno. write a code...

I have a sim 808 (fona 808) breakout connected to an adruino uno. write a code that makes it pick up automatically when called from certain numbers.

Solutions

Expert Solution

#include <sim900.h>/downld lbry from https://github.com/Seeed-Studio/GPRS_SIM900

#include <SoftwareSerial.h>/defalt lbry

#include <Wire.h>/deflt libry

int Incomingh;

String data,Fdata;

/Conct Tx stick of GSM to 9 of Arno

/Cnct Rx stick of GSM to 10 of Arduo

SoftwareSerial gprs(9,10);//tx,rx

void setup(){

Serial.begin(9600);

sim900_init(&gprs, 9600);/GSM modle wrks on 9600 baudrte

pinMode(8, OUTPUT);/stick to trn on Voice

Serial.println("Arduino - Automatic Voice Machine");

}

/*Function to peruse Incoming information from GSM to Arduino*/

void check_Incoming()

{

if(gprs.available())/If GSM is stating something

{

Incomingch = gprs.read();/Listen to it and store in this factor

in the event that (Incomingch == 10 || Incomingch ==13)/If it says space (10) or Newline (13) it implies it has finished single word

{Serial.println(data); Fdata =data; information = ""; }/Print the word and clear the variable to begin new

else

{

String newchar = String (char(Incomingch));/change over the roast to string by utilizing string objects

information = information +newchar;/After changing over to string, do string connection

}

}

}

/*##End of Function##*/

void loop(){

check_Incoming();/Read what GSM module is stating

if(Serial.available()){/Used for troubleshooting

gprs.write(Serial.read());/Used for troubleshooting

}/Used for troubleshooting

in the event that (Fdata == "RING")/If the GSM module says RING

{

delay(5000);/sit tight for 5sec to make 3 ring delay.

gprs.write ("ATA\r\n");/Answer the call

Serial.println ("Placed Received");/Used for investigating

while(Fdata != "alright")/Until call effectively replied

{check_Incoming();/Read what GSM module is stating

Serial.println ("Playing Recorded message");/Used for investigating

/Play the recorded voice message

delay(500);

digitalWrite(8, HIGH);/Go high

delay(200);/sit tight for 200 msec

digitalWrite(8, LOW);/Go low

}

}

}


Related Solutions

this is code to Temperature and Humidity Monitoring over ThingSpeak using Arduino UNO and ESP8266 i...
this is code to Temperature and Humidity Monitoring over ThingSpeak using Arduino UNO and ESP8266 i need someone explain the steps for me #include <stdlib.h> #include <DHT.h> #define DHTPIN 5         // DHT data pin connected to Arduino pin 5 #define DHTTYPE DHT11     // DHT11 (DHT Sensor Type ) DHT dht(DHTPIN, DHTTYPE); // Initialize the DHT sensor #define SSID "WiFi Name"     // "WiFi Name" #define PASS "WiFi Password"       // "Password" #define IP "184.106.153.149"// thingspeak.com ip String msg = "GET /update?key=Your API...
I need an Arduino uno code to measure high low levels with hcsr04 of a tank...
I need an Arduino uno code to measure high low levels with hcsr04 of a tank and display it on i2c 20x4 lcd.
Matlab code problems I have to write a code using functions to find out if a...
Matlab code problems I have to write a code using functions to find out if a year is a leap year. I'm on the write track i feel like but I keep getting an error message and matlab isnt helping to troubleshoot. The issue is on line 30. Here is my code: function project_7_mfp() %   PROJECT_7_ABC   project_7_abc() creates a function that prompts the user %   enter a year after 1582 It then determines if it is a leap year %...
write the code of 4 digit 7-segment display using arduino uno in assembly language by using...
write the code of 4 digit 7-segment display using arduino uno in assembly language by using software AVR STUDIO 5.1?
I have the following assignment for probability class: I am supposed to write a routine (code)...
I have the following assignment for probability class: I am supposed to write a routine (code) in MATLAB that does solve the following problem for me: a) Generate N=10000 samples of a Uniform random variable (X) using the rand () command. This Uniform RV should have a range of -1 to +3. b) Generate (Estimate) and plot the PDF of X from the samples. You are not allowed to use the Histogram () command, any commands from the Matlab Statistics...
JAVA CODE BEGINNERS, I already have the demo code included Write a Bottle class. The Bottle...
JAVA CODE BEGINNERS, I already have the demo code included Write a Bottle class. The Bottle will have one private int that represents the countable value in the Bottle. Please use one of these names: cookies, marbles, M&Ms, pennies, nickels, dimes or pebbles. The class has these 14 methods: read()(please use a while loop to prompt for an acceptable value), set(int), set(Bottle), get(), (returns the value stored in Bottle), add(Bottle), subtract(Bottle), multiply(Bottle), divide(Bottle), add(int), subtract(int), multiply(int), divide(int), equals(Bottle), and toString()(toString()...
I'm new in MATLAB and I have to write a code in MATLAB which converts a...
I'm new in MATLAB and I have to write a code in MATLAB which converts a number from one base to another without using base2base, etc
Write MIPS assembly code for the following C code. for (i = 10; i < 30;...
Write MIPS assembly code for the following C code. for (i = 10; i < 30; i ++) { if ((ar[i] > b) || (ar[i] <= c)) ar[i] = 0; else ar[i] = a; }
We need to code an LCD with a temperature and humidity sensor for the arduino UNO...
We need to code an LCD with a temperature and humidity sensor for the arduino UNO board. The LCD should simply display the temperature and humidity reading from the DHT11 sensor. We must do this without the use of arduino or lcd libraries, and only use raw c code. For example we need to use PORTD |= (1<<5); to set the pin to 5. The LCD is connected to pins A0 and A1, and it is using I2C. The temperature...
Write code in SAS to do each of the following I have posted the data below...
Write code in SAS to do each of the following I have posted the data below from a pace delimited data set consisting of 66 randomly selected cars Upload the data set to SAS and store it as a SAS data set called cars. Make sure the full values are stored for all character variables. Create a comparative bar chart (with appropriate title and labels) displaying the brands of each car by fuel type (so that fuel type is on...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT