LattePanda RS232扩展板

简介


产品参数

产品尺寸


应用


引脚说明

LattePanda RS232扩展版引脚图

DB9引脚定义

DB9公头引脚编号 引脚定义
1号脚 NC
2号脚 RXD
3号脚 TXD
4号脚 NC
5号脚 GND
6~9号脚 NC


LattePanda V1 引脚定义(建议参考 LattePanda 官方wiki



使用教程

这里演示 LattePanda V1 通过扩展板与 Arduino 通信。

扩展板与 LattePanda V1 插接示意

插接示意

需使用随包装搭配的铜柱和螺丝固定扩展版与 LattePanda

连线图

准备硬件:

  1. 一块 Arduino 主控
  2. 一块 Arduino RS232 扩展板(DFR0258)
  3. 一块 LattePanda V1
  4. 一块 LattePanda V1 RS232 接口扩展板(DFR0734)
  5. 一根 RS232 公公头数据线

准备软件:

  1. Arduino IDE

接线方式

  1. 将 Arduino RS232 扩展板插接在Arduino 主控上
  2. 将 LattePanda V1 RS232 接口扩展板插接在 LattePanda V1 上
  3. 使用 RS232 数据线将两端连接在一起 如下图:

接线方式



arduino 烧录如下代码:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  while(!Serial);
}

void loop() {
  // put your main code here, to run repeatedly:
  if(Serial.available()>0){
    char a;
    a = Serial.read()+1;
    Serial.print(a); //return all the data that received from LP
  }
}

LattePanda 上打开串口监视器,选择COM1串口,波特率设置115200。 向 Arduino 发送数据会加 1 返回

串口监视器



疑难解答

更多问题及有趣的应用,请访问论坛



更多

DFshopping_car1.png DFRobot商城购买链接