【问题标题】:Arduino : Icomsat 1.1 GSM and Adafruit GPS, why GSM shut down when I connect GPS with software serial?Arduino:Icomsat 1.1 GSM 和 Adafruit GPS,当我将 GPS 与软件串行连接时,为什么 GSM 会关闭?
【发布时间】:2014-03-19 02:25:23
【问题描述】:

我尝试用我的 Arduino 1 R3 连接两个屏蔽。

盾牌是:

  • 带有 ICOMSAT 1.1 屏蔽的 GSM (http://imall.iteadstudio.com/im120417009.html)
  • 带 Adafruit GPS 屏蔽的 GPS(adafruit 产品:1272)
  • 如果我将这些模块分开使用,它们效果很好,当我将它们放在一起时,GSM 模块不通电,状态指示灯关闭,仅电源指示灯亮。

    我看了很多论坛,似乎问题是软件序列号,所以我尝试了这些解决方案:http://forums.adafruit.com/viewtopic.php?f=25&t=38764&hilit=gsm+gps&start=15

    => 使用 AltSoftSerial,在 GPS Shield 的引脚 9 和 RX 之间架起一座桥,并从 TX 切断引脚 7。

    但它不起作用。

    这是一段代码

    #include <Adafruit_GPS.h>
    #include <GSM.h>
    #include <AltSoftSerial.h>
    
    
    #define PINNUMBER ""
    #define PMTK_SET_NMEA_OUTPUT_RMCONLY "$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29"
    #define PMTK_Q_RELEASE "$PMTK605*31"
    #define PMTK_SET_NMEA_UPDATE_1HZ  "$PMTK220,1000*1F"
    
    //GPS
    AltSoftSerial gpsSerial;  //rx, tx (softwareSerial is called in GSM.H)
    Adafruit_GPS GPS(&gpsSerial);
    
    //GSM
    GSM gsmAccess;
    GSM_SMS sms;
    
    void setup(){
       Serial.begin(9600);
       GPS.begin(9600);
       ...
    }
    
    void loop(){
    ...
    }
    

    如果我将 GPS Shield 的开关置于“Direct”,GSM 电源打开,但我无法读取 GPS 数据。

    【问题讨论】:

      标签: gps arduino gsm


      【解决方案1】:

      首先,您需要知道您不能同时使用两个软件序列号。其次,icomsat 使用 D8 和 D9 作为软件电源控制和复位,您不应该使用 D9 作为软件串行引脚。

      最好的方法是使用iteaduino mega 2560和iteaduino gps shield。

      http://imall.iteadstudio.com/development-platform/arduino/arduino-compatible-mainboard/im120410003.html

      http://imall.iteadstudio.com/im120417017.html

      将 icomsat 连接到 UART1,并将 gps 连接到 UART2。

      你可以在sim900上找到tinygps库和gsm库,你可以在icomsat网站的有用链接下找到gsm库。

      最好的问候!


      斯坦·李

      硬件工程师

      Lizq@iteadstudio.com

      【讨论】:

        【解决方案2】:

        您可以使用 AltSoftSerial 和 TinyGPSPlus 在 Arduino R3 上创建工作的 GPS 和 GSM 系统。 这是执行此操作的项目的链接 http://www.mallinson-electrical.com/shop/gpsgsm 希望这会有所帮助

        【讨论】:

        • 请不要发布仅链接的答案。
        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-08-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-12-25
        • 2022-06-18
        • 1970-01-01
        相关资源
        最近更新 更多