Hello.
I first time use arduino and need small help.
I find online code for voice call with uno and sim900 and everything work fine but i want to start calling after hold 10sec button not just press. Can someone edit code for me. thanks
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "call.h"
#define ACTIVE LOW
const int ledPin = 13; // the number of the LED pin
CallGSM call;
boolean started = false;
int buttonState = 1;
const int buttonPin = 7; // the number of the pushbutton pin
boolean calling = false;
void setup()
{
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
digitalWrite(buttonPin, HIGH);
if (gsm.begin(9600))
{
Serial.println("\nstatus=READY");
started = true;
}
else
Serial.println("\nstatus=IDLE");
}
void loop()
{
buttonState = digitalRead(buttonPin);
if (buttonState == ACTIVE) {
if (calling)
{
digitalWrite(ledPin, LOW);
calling = false;
call.HangUp();
delay(1000);
} else
{
calling = true;
digitalWrite(ledPin, HIGH);
delay(1000);
call.Call("number"); "number"
;
}
}
}
OK... if you are interested in learning, may be put your "complex" projet aside for a couple days and play with tutos and the simple examples and the language; Once this is mastered you'll see it's not too difficult to achieve what you want to do - but there is a bit of a learning curve