bobo | NPC | 创造力: | 帖子: | 发消息 | 串个门 | 加好友 | 打招呼
2014-10-29 11:38:54 [显示全部楼层]
4527浏览
查看: 4527|回复: 2

[已解决] 台湾客户对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




byte gsmDriverPin[3] = {

  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  NPC
 楼主|

发表于 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 编辑

  1. byte gsmDriverPin[3] = {3,4,5};//The default digital driver pins for the GSM and GPS mode
  2. //If you want to change the digital driver pins
  3. //or you have a conflict with D3~D5 on Arduino board,
  4. //you can remove the J10~J12 jumpers to reconnect other driver pins for the module!
  5. void setup()
  6. {   
  7. //Init the driver pins for GSM function
  8.   for(int i = 0 ; i < 3; i++){
  9.     pinMode(gsmDriverPin[i],OUTPUT);
  10.   }
  11.   digitalWrite(5,HIGH);//Output GSM Timing
  12.   delay(1500);
  13.   digitalWrite(5,LOW);  
  14.   digitalWrite(3,LOW);//Enable the GSM mode
  15.   digitalWrite(4,HIGH);//Disable the GPS mode
  16.   delay(2000);
  17.   Serial.begin(9600); //set the baud rate
  18.   delay(5000);//call ready
  19.   delay(5000);
  20.   delay(5000);
  21. }
  22.   
  23. void loop()
  24. {  
  25.    Serial.println("AT");//Send AT command     
  26.    delay(2000);
  27.    Serial.println("AT");   
  28.    delay(2000);
  29.   //Make a phone call
  30.    Serial.println("ATD13564078965;");//Change the receiver phone number   
  31.    while(1);
  32. }
复制代码


程序需要修改一下,有一点点错误,我已经改好,可以编译通过。在下载程序时,扩展板接到主控板UNO,SIM卡、麦克、耳机插好。
USB线、外接电源接好。扩展板S1开关拨到Prog端,下载下面程序。将S1开关拨到Comm,S2开关拨到Arduino,Uart Select的拨码开关拨到中间位置,如果没有启动可以按下RST复位键,重新开启。
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail