资源简介
SIMI808的单片机调试程序,有89系列,12、15系列单片机SIM808使用例程,也有STM32F103系列的SIM808使用例程。
代码片段和文件信息
/*
GSM.cpp - library for the GSM Playground - GSM Shield for Arduino
Released under the Creative Commons Attribution-Share Alike 3.0 License
http://www.creativecommons.org/licenses/by-sa/3.0/
www.hwkitchen.com
*/
#include “WProgram.h“
#include “NewSoftSerial.h“
#include “GSM_Shield.h“
extern “C“ {
#include
}
NewSoftSerial mySerial(4 5); //rx tx
#ifdef DEBUG_LED_ENABLED
int DEBUG_LED = 25; // LED connected to digital pin 25
void GSM::blinkDebugLED (byte num_of_blink)
{
byte i;
pinMode(DEBUG_LED OUTPUT); // sets the digital pin as output
for (i = 0; i < num_of_blink; i++) {
digitalWrite(DEBUG_LED HIGH); // sets the LED on
delay(50);
digitalWrite(DEBUG_LED LOW); // sets the LED off
delay(500);
}
}
#endif
#ifdef DEBUG_PRINT
/**********************************************************
Two methods print out debug information to the standard output
- it means to the serial line.
First method prints string.
Second method prints integer numbers.
Note:
=====
The serial line is connected to the GSM module and is
used for sending AT commands. There is used “trick“ that GSM
module accepts not valid AT command strings because it doesn‘t
understand them and still waits for some valid AT command.
So after all debug strings are sent we send just AT as
a valid AT command and GSM module responds by OK. So previous
debug strings are overwritten and GSM module is not influenced
by these debug texts
string_to_print: pointer to the string to be print out
last_debug_print: 0 - this is not last debug info we will
continue with sending... so don‘t send
AT(see explanation above)
1 - we are finished with sending debug info
for this time and finished AT
will be sent(see explanation above)
**********************************************************/
void GSM::DebugPrint(const char *string_to_print byte last_debug_print)
{
if (last_debug_print) {
Serial.println(string_to_print);
SendATCmdWaitResp(“AT“ 500 50 “OK“ 1);
}
else Serial.print(string_to_print);
}
void GSM::DebugPrint(int number_to_print byte last_debug_print)
{
Serial.println(number_to_print);
if (last_debug_print) {
SendATCmdWaitResp(“AT“ 500 50 “OK“ 1);
}
}
#endif
/**********************************************************
Method returns GSM library version
return val: 100 means library version 1.00
101 means library version 1.01
**********************************************************/
int GSM::LibVer(void)
{
return (GSM_LIB_VERSION);
}
/**********************************************************
Constructor definition
***********************************************************/
GSM::GSM(void)
{
// set some GSM pins as inputs some
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 658 2012-05-22 17:43 Arduino\Demo1.txt
文件 651 2013-02-02 17:41 Arduino\Demo2.txt
文件 2061 2013-01-01 22:44 Arduino\Demo3.txt
文件 2753 2013-01-01 21:52 Arduino\Demo5.txt
文件 1518 2012-05-30 18:37 Arduino\Demok4.txt
文件 1203 2011-03-21 16:32 Arduino\GSM Library\GSM_Shield\examples\GSM_Shield_Call\GSM_Shield_Call.pde
文件 793 2011-03-21 16:32 Arduino\GSM Library\GSM_Shield\examples\GSM_Shield_LibVer\GSM_Shield_LibVer.pde
文件 1263 2011-03-21 16:32 Arduino\GSM Library\GSM_Shield\examples\GSM_Shield_Reg\GSM_Shield_Reg.pde
文件 6487 2011-03-21 16:33 Arduino\GSM Library\GSM_Shield\examples\GSM_Shield_Test\GSM_Shield_Test.pde
文件 71816 2011-03-10 13:58 Arduino\GSM Library\GSM_Shield\GSM_Shield.cpp
文件 8594 2011-03-11 17:19 Arduino\GSM Library\GSM_Shield\GSM_Shield.h
文件 1261 2010-12-31 10:05 Arduino\GSM Library\GSM_Shield\keywords.txt
文件 50176 2011-03-11 17:29 Arduino\GSM Library\GSM_Shield\Library GSM_Shield.doc
文件 23373 2011-03-11 17:28 Arduino\GSM Library\GSM_Shield\Library GSM_Shield.odt
文件 14284 2010-01-18 13:07 Arduino\GSM Library\GSM_Shield\NewSoftSerial.cpp
文件 3395 2010-01-06 11:37 Arduino\GSM Library\GSM_Shield\NewSoftSerial.h
文件 57816 2012-04-27 12:09 Arduino\GSM Library\GSM_Shield2.zip
文件 11618 2011-08-31 01:27 Arduino\LCD5110_Graph-0022\LCD5110_Graph\DefaultFonts.c
文件 7228 2011-08-30 02:44 Arduino\LCD5110_Graph-0022\LCD5110_Graph\examples\LCD5110_Graph_Demo\Graphics.c
文件 3451 2011-08-30 02:52 Arduino\LCD5110_Graph-0022\LCD5110_Graph\examples\LCD5110_Graph_Demo\LCD5110_Graph_Demo.pde
文件 830 2011-08-28 02:53 Arduino\LCD5110_Graph-0022\LCD5110_Graph\examples\LCD5110_Scrolling_Text\LCD5110_Scrolling_Text.pde
文件 950 2011-08-31 01:49 Arduino\LCD5110_Graph-0022\LCD5110_Graph\examples\LCD5110_TinyFont_View\LCD5110_TinyFont_View.pde
文件 374 2011-08-31 01:50 Arduino\LCD5110_Graph-0022\LCD5110_Graph\keywords.txt
文件 10473 2011-08-31 23:52 Arduino\LCD5110_Graph-0022\LCD5110_Graph\LCD5110_Graph.cpp
文件 2879 2011-08-28 16:53 Arduino\LCD5110_Graph-0022\LCD5110_Graph\LCD5110_Graph.h
文件 68812 2011-09-01 00:47 Arduino\LCD5110_Graph-0022\LCD5110_Graph\LCD5110_Graph.pdf
文件 24356 2010-01-29 16:16 Arduino\LCD5110_Graph-0022\LCD5110_Graph\LICENSE.txt
文件 60 2011-09-01 10:37 Arduino\LCD5110_Graph-0022\LCD5110_Graph\version.txt
文件 63898 2013-02-02 17:48 Arduino\LCD5110_Graph-0022.rar
文件 63883 2013-02-02 17:47 Arduino\LCD5110_Graph-1.02.rar
............此处省略2555个文件信息
评论
共有 条评论