caonimab
- 我是MM
-
普通会员
最后登陆时间:2015-10-30 14:42:51 |
1#
发表于 2015-04-18 00:04:37
初学者,请多多指教。
板子是Intel Galileo 2
用的是Seeed的套件
这是例程,
发现,USB转串口(该线用于串口通信)连接同学的电脑,
下载编译的USB连我的电脑(用于下载编译该例程),
编译完成下载到板子后
同学在他电脑上用串口助手发送字符串,但是屏幕上没有显示。
麻烦各位大神解答下这是什么原因?
#include <Wire.h>
#include "rgb_lcd.h"
rgb_lcd lcd;
void setup(){
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// initialize the serial communications:
Serial.begin(9600);
}
void loop()
{
// when characters arrive over the serial port...
if (Serial.available())
{
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0)
{
// display each character to the LCD
lcd.write(Serial.read());
}
}
}
/*********************************************************************************************************
END FILE
*********************************************************************************************************/
|
|