使用proteus模拟arduino mega 2560与GSM模块

时间:2015-03-16 07:51:55

标签: arduino embedded simulation

我的模拟真的很痛苦!尝试将我的arduino mega 2560连接到我的电路中的COMPIM(用作GSM模块),并且还加载了示例代码,但该死的!徒然!我想查看虚拟终端发送的数据,但什么都没得到!它还抱怨CPU使用率过高。

enter image description here

此后,消息显示如下。

enter image description here

有人请帮帮我。我犯了错误哦?事实上,在模拟中显示的arduino代码也让我很难过。我正在使用的是如下所示。

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
    mySerial.println("Hello, world?");
  if (Serial.available())
    mySerial.println("Hello, world?");
}

对于提供的任何帮助,我们都会感激不尽。

0 个答案:

没有答案