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.
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()...
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...
I have entered this line of code for exercise 6-8 saying to Write an application that...
I have entered this line of code for exercise 6-8 saying to Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score,...
So I have written a code for it but i just have a problem with the...
So I have written a code for it but i just have a problem with the output. For the month with the highest temperature and lowest temperature, my code starts at 0 instead of 1. For example if I input that month 1 had a high of 20 and low of -10, and every other month had much warmer weather than that, it should say "The month with the lowest temperature is 1" but instead it says "The month with...
a) i) The following VHDL code contains erroneous syntax. Re write the code in its corrected...
a) i) The following VHDL code contains erroneous syntax. Re write the code in its corrected format onto your answer sheet. You may assume that din is a 16-bit vector and that the ld, lr and cl inputs are 1-bit wide. lp: process(clk) signal reg : std_logic_vector(15 downt begin if cl=’1’ then reg := (others:=’0’); else if clk=’1’ and clkevent then if ld=’1’ reg <= din; end if; if lr=’1’ then reg := reg(14 downto 0) & “0 else reg...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT