c_cpp 使用Arduino作为直接USB转串口转换器!在Arduino Duemilanove上测试过。可能是3.3V TTL但是可以与之通信

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp 使用Arduino作为直接USB转串口转换器!在Arduino Duemilanove上测试过。可能是3.3V TTL但是可以与之通信相关的知识,希望对你有一定的参考价值。

/*
 * Arduino Serial Bypass - use an Arduino as a dumb USB 2 Serial Converter
 *
 * This code makes the Arduino not interfere with pins 0 and 1
 * which are connected to RX and TX on the FTDI chip. This allows
 * the data coming from the FTDI USB 2 Serial chip to flow directly
 * to another device. Since RX and TX are labeled from the Arduino's
 * point of view, don't cross the wires, but plug the device's 
 * RX wire into the RX pin 0 and the TX wire into the TX pin 0.
 *
 * Because this is a direct hardware connection, high baud rates
 * like 115200 are not a problem like they are with SoftwareSerial.
 *
 * Credit goes to "ihsan". His original website is down at the time
 * of writing, but I found the text archived on:
 * http://web.archive.org/web/20101027200300/http://students.sabanciuniv.edu/kehribar/?p=19
 */
void setup()
{
  pinMode(0,INPUT);
  pinMode(1,INPUT);
}
void loop()
{

}

以上是关于c_cpp 使用Arduino作为直接USB转串口转换器!在Arduino Duemilanove上测试过。可能是3.3V TTL但是可以与之通信的主要内容,如果未能解决你的问题,请参考以下文章

如何使用串口助手在PC上直接抄电表?我有USB转串口,232转485头。

arduino uno和arduino mini 有啥不同?

attiny85软串口乱码

Arduino多串口/隐藏输出

开发板上的五方向按键如何通过串口控制

pn532连接了arduino还能连电脑吗