Created
July 19, 2013 01:37
-
-
Save billiegoose/6034455 to your computer and use it in GitHub Desktop.
Use your Arduino as a direct USB to serial converter! Tested on an Arduino Duemilanove. Probably 3.3V TTL but worked for communicating with my supposedly 5V TTL HerkuleX servo at 115200 baud.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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() | |
{ | |
} |
Tested on this a Witty cloud ESP8266 board, works like a charm:
Nothing in setup() or loop() also silences the MCU, and is exactly the same.
You can also achieve this by shorting the RESET pin if you have a jumper wire handy.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Really works great and much more stable with esp8266, thanks for sharing!