bobo 发表于 2014-10-29 11:38:54

台湾客户对TEL0051 测试的问题

我是用這塊板子,要如何才能達到直接撥出的功能 // Product name: GPS/GPRS/GSM Module V3.0
// # Product SKU : TEL0051
// # Version   : 0.1

// # Description:
// # The sketch for driving the gsm mode via the Arduino board

// # Steps:
// #      1. Turn the S1 switch to the Prog(right side)
// #      2. Turn the S2 switch to the Arduino side(left side)
// #      3. Set the UART select switch to middle one.
// #      4. Upload the sketch to the Arduino board
// #      5. Turn the S1 switch to the comm(left side)
// #      6. Plug the jumper caps back to GSM side
// #      7. RST the board

// #      wiki link- http://www.dfrobot.com/wiki/index.php/GPS/GPRS/GSM_Module_V3.0_(SKU:TEL0051)

byte gsmDriverPin = {
3,4,5};//The default digital driver pins for the GSM and GPS mode
//If you want to change the digital driver pins
//or you have a conflict with D3~D5 on Arduino board,
//you can remove the J10~J12 jumpers to reconnect other driver pins for the module!

void setup()
{   
//Init the driver pins for GSM function
for(int i = 0 ; i < 3; i++){
    pinMode(gsmDriverPin,OUTPUT);
}
digitalWrite(5,HIGH);//Output GSM Timing
delay(1500);
digitalWrite(5,LOW);
digitalWrite(3,LOW);//Enable the GSM mode
digitalWrite(4,HIGH);//Disable the GPS mode
delay(2000);
Serial.begin(9600); //set the baud rate
delay(5000);//call ready
delay(5000);
delay(5000);
}

void loop()
{
   Serial.println("AT");//Send AT command   
   delay(2000);
   Serial.println("AT");   
   delay(2000);
//Make a phone call
   Serial.println("ATD15902808530;");//Change the receiver phone number   
   while(1);
}


bobo 发表于 2014-10-29 11:41:44


//--------------------------------------------------------
void setup()
{
   
   pinMode(3,OUTPUT);
   pinMode(4,OUTPUT);
   pinMode(5,OUTPUT);
   
   digitalWrite(5,HIGH);
   delay(1500);
   digitalWrite(5,LOW);
}
void loop()   
{
   digitalWrite(3,LOW);
   digitalWrite(4,HIGH);
}
//------------------------------------------------------------
內置圖片 2
我現在可以打電話和傳簡訊的功能,但是需要在COM中輸入AT等待同步在輸入ATD"XXX"(XXX是目的輸入號碼)



問題:我想要讓Arduino接收到觸發訊號,不需要再經由鍵盤輸入電話號碼,然後直接撥打預設的電話號碼



使用產品資料庫的打電話程式無法撥出
內置圖片 5
內置圖片 4
執行結果沒有OK,電話也沒有撥出



最後
你的產品資料庫網址有問題
正確
http://www.dfrobot.com/wiki/index.php/GPS/GPRS/GSM_Module_V3.0_(SKU:TEL0051)
錯誤
https://wiki.dfrobot.com.cn/index.php/(SKU:TEL0051)GPS/GPRS/GSM_%E6%89%A9%E5%B1%95%E6%9D%BF_V3.0

Eric 发表于 2014-10-30 12:11:19

本帖最后由 Eric 于 2014-10-30 12:16 编辑

byte gsmDriverPin = {3,4,5};//The default digital driver pins for the GSM and GPS mode

//If you want to change the digital driver pins

//or you have a conflict with D3~D5 on Arduino board,

//you can remove the J10~J12 jumpers to reconnect other driver pins for the module!


void setup()

{   

//Init the driver pins for GSM function

for(int i = 0 ; i < 3; i++){

    pinMode(gsmDriverPin,OUTPUT);

}

digitalWrite(5,HIGH);//Output GSM Timing

delay(1500);

digitalWrite(5,LOW);

digitalWrite(3,LOW);//Enable the GSM mode

digitalWrite(4,HIGH);//Disable the GPS mode

delay(2000);

Serial.begin(9600); //set the baud rate

delay(5000);//call ready

delay(5000);

delay(5000);

}



void loop()

{

   Serial.println("AT");//Send AT command   

   delay(2000);

   Serial.println("AT");   

   delay(2000);

//Make a phone call

   Serial.println("ATD13564078965;");//Change the receiver phone number   

   while(1);

}

程序需要修改一下,有一点点错误,我已经改好,可以编译通过。在下载程序时,扩展板接到主控板UNO,SIM卡、麦克、耳机插好。
USB线、外接电源接好。扩展板S1开关拨到Prog端,下载下面程序。将S1开关拨到Comm,S2开关拨到Arduino,Uart Select的拨码开关拨到中间位置,如果没有启动可以按下RST复位键,重新开启。
页: [1]
查看完整版本: 台湾客户对TEL0051 测试的问题