arduino uno GSM / GPRS / GPS Shield(B)waveshare AT命令不起作用

时间:2016-12-15 12:20:17

标签: arduino gsm

我使用带有gsm / gprs / gps盾牌(b)wavehare的arduino uno

使用此链接http://www.waveshare.com/wiki/GSM/GPRS/GPS_Shield_(B)

当我上电时屏蔽电源接通且网络LED闪烁。

但是当我发送AT命令时什么都不显示。

我的代码是:

    Public Sub ExportButton_Click()

    Dim inputWks As Worksheet
    Dim historyWks As Worksheet
    Dim newWB As Workbook, newSht As Worksheet, i As Long
    Dim cb, f As Range

    Set historyWks = Worksheets("NameList")
    Set inputWks = Worksheets("UserForm")

    If FileNameTxt.Value = "" Then
        MsgBox "Please choose a file name"
        WinOSBtn.Value = False
        ExportButton.Locked = True
        ExportButton.BackColor = RGB(250, 250, 250)
        ExportButton.ForeColor = RGB(220, 220, 220)
        FileNameTxt.SetFocus
        Exit Sub  '==> Is there a reason why i'm putting this "Exit Sub" here?
    Else
        ExportButton.Locked = False
        ExportButton.BackColor = RGB(241, 241, 241)
        ExportButton.ForeColor = RGB(0, 0, 0)
    End If

    'Prompts for a file name
    If FileNameTxt.Value = "" Then
        MsgBox "Please choose a file name"
    Else

    '=====================================================================
    '   Original Worksheet Add
    '=====================================================================
        'Add a new workbook with a file name
        'Workbooks.Add
        'ActiveWorkbook.SaveAs Filename:=FileNameTxt.Value & ".xls"
        'ActiveWorkbook.Close
        'Workbooks.Open (FileNameTxt.Value & ".xls")
        'Set newWB = Workbooks(FileNameTxt.Value & ".xls")


      'Test Worksheet Add => Still to test on OSX
     Set newWB = Workbooks.Add()
     newWB.SaveAs Filename:=FileNameTxt.Value & ".xls"
     Set newSht = newWB.Sheets(1)

     For i = 1 To 21

        Set cb = Me.Controls("Combobox" & Chr(64 + i))

        If Len(cb.Value) > 0 Then
            Set f = historyWks.Range("A1:AM1").Find(cb.Value, lookat:=xlWhole)

            If Not f Is Nothing Then
                With historyWks
                    .Range(f, .Cells(.Rows.Count, f.Column).End(xlUp)).Copy
                End With
                With newSht.Cells(1, i)
                    .PasteSpecial xlPasteAll
                    .PasteSpecial xlPasteValues
                End With
             End If

        End If
    Next i


    ExportForm.Hide

    Dim iMsg As Long

    iMsg = MsgBox("Export Complete", vbOKOnly)
        If i = vbOK Then
        Unload Me

End If
End If
End Sub

屏蔽设置如此图像 http://www.waveshare.com/wiki/File:GSM-GPRS-GPS-Shield-B-UserManual-17.jpg

你知道为什么或确切的问题是什么?

1 个答案:

答案 0 :(得分:0)

我正在通过串行监视器发送AT命令。

当我通过像“miserie.print(”AT“)这样的代码发送它时,然后串行监视器显示答案。

所以,我会继续尝试。