6841浏览
查看: 6841|回复: 1

[讨论] SoftwareSerial 接受不到信号 bluno v1.5

[复制链接]
代码就是  官网里的代码  http://arduino.cc/en/Reference/SoftwareSerial#.UwGGF_mSyjM
  1. /*
  2.   Software serial multple serial test
  3. Receives from the hardware serial, sends to software serial.
  4. Receives from software serial, sends to hardware serial.
  5. The circuit:
  6. * RX is digital pin 10 (connect to TX of other device)
  7. * TX is digital pin 11 (connect to RX of other device)
  8. Note:
  9. Not all pins on the Mega and Mega 2560 support change interrupts,
  10. so only the following can be used for RX:
  11. 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
  12. Not all pins on the Leonardo support change interrupts,
  13. so only the following can be used for RX:
  14. 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
  15. created back in the mists of time
  16. modified 25 May 2012
  17. by Tom Igoe
  18. based on Mikal Hart's example
  19. This example code is in the public domain.
  20. */
  21. #include <SoftwareSerial.h>
  22. SoftwareSerial mySerial(10, 11); // RX, TX
  23. void setup()  
  24. {
  25.   // Open serial communications and wait for port to open:
  26.   Serial.begin(9600);
  27.   while (!Serial) {
  28.     ; // wait for serial port to connect. Needed for Leonardo only
  29.   }
  30.   Serial.println("Goodnight moon!");
  31.   // set the data rate for the SoftwareSerial port
  32.   mySerial.begin(4800);
  33.   mySerial.println("Hello, world?");
  34. }
  35. void loop() // run over and over
  36. {
  37.   if (mySerial.available())
  38.     Serial.write(mySerial.read());
  39.   if (Serial.available())
  40.     mySerial.write(Serial.read());
  41. }
复制代码



但是打开串口,  只能看到“goodnight moon!” , 虚拟串口接受不到信息是什么情况, 板子是 bluno v1.5, ide: Arduino 1.0.5,  有遇到这种问题么?  

zs1621  见习技师
 楼主|

发表于 2014-2-17 16:03:40

这个帖子  作废    The circuit:
* RX is digital pin 10 (connect to TX of other device)
* TX is digital pin 11 (connect to RX of other device)
没有在10,11连接其他设备  当然没有数据...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

硬件清单

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

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

mail