The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [uart]

A UART is a Universal Asynchronous Receiver/Transmitter. This refers to the "hardware" serial port in the processor. Use this tag for questions about hardware serial.

Filter by
Sorted by
Tagged with
14
votes
1answer
294 views

Mysterious RX pulses on UART connect on OS X Arduino Due

Arduino IDE 1.6.8, Arduino Due, Mac OS 10.11.3 I am seeing eight mysterious pulses on the RX line when I connect to the serial port using multiple client libraries (Python, JavaScript as well as the ...
11
votes
2answers
16k views

What's the difference between all the Software Serial Libraries? Which one is Arduino Nano compatible?

There are so many Software Serial Libraries, what are the differences between them? And which one I can use with my Arduino Nano? For my Arduino Nano I need one Hardware Serial Port and one Software ...
11
votes
1answer
667 views

How can I communicate Raspberry Pi and Arduino (in both ways) using a 10-15m distance wires?

I am starting a personal project of home automation and I have a raspberry pi and an arduino Uno board. I want communicate raspberry pi and my arduino where my raspberry should be able to write and ...
6
votes
2answers
8k views

ESP8266 Programming using ESP-01 to USB converter

I am new to ESP8266. To ease out the task of programming esp8266, I bought this: ESP-01 ESP8266 Programmer CH340G Chip USB WiFi Wireless UART GPIO0 Adapter. Configured Arduino Interface to run AT ...
5
votes
1answer
997 views

How to work with non-traditional UART baud rates

I am trying, unsuccessfully to communicate, using my Arduino Nano, with a custom device at a baud rate of 800 kbit/s. The Arduino code look like this: void setup() { // Put your setup code ...
5
votes
3answers
3k views

Super slow serial (UART) communication on Arduino

I am using this device for my Arduino that connects to the OBD-II port of my car to get various information such as speed, rpm, etc. I am using this for a digital Nixie tube speedometer using the ...
4
votes
1answer
4k views

I2C to UART bridge as breakout or in DIP package

For a project, I need to connect more than one device to an Arduino through a serial port with hardware flow control (RTS/CTS). Sparkfun used to make breakout boards for the SC16IS750, but this ...
4
votes
3answers
6k views

Arduino Hardware serial library with rts/cts flow control support

Does there exist (any user developed etc.) version of the Hardware UART serial library that has support for RTS/CTS based flow control? More interested in the Tx side (Arduino sends data, while the ...
3
votes
3answers
3k views

How to define a SoftwareSerial object inside a class?

I have a header file called Rhino.h with class Rhino. I want to pass RX and TX pin numbers to this object class, and with this, define a SoftwareSerial object to be used inside the Rhino class. The ...
3
votes
2answers
314 views

Double Speed Operation for USART on Arduino Mega 2560

I happened to be looking through the HardwareSerial.cpp file that contains the functions used for Serial communication for Arduino. While looking through the HardwareSerial::begin(baud, config) ...
3
votes
1answer
531 views

Is there a transmission protocol library for SPI?

When communicating over SPI, one byte is sent at a time. Is there a library (C or C++) that allows for sending strings? Essentially it would be a protocol library handling the start and the end of a ...
3
votes
1answer
5k views

Code to use an Arduino Mega 2560 to transfer UART <-> USB to debug an other Microcontroller

I have the following circuit and want to use the Arduino Mega 2560 as an debugger for an other Microcontroller. So I am looking for the code to redirect the UART input from "P17 (RX2)" to the serial ...
3
votes
3answers
275 views

Solution for simple multi-Arduino communication network (or alternative?)

I know similar question has already been discussed here but I could not get clear answer. Here is the thing: I have one master device - Mega2560, and multiple (about 9 but could be expandedin future) ...
3
votes
2answers
144 views

Capacitors in DC circuits

I have a question about capacitors in DC (digital) circuits. The picture below is an edited schematic of the Arduino Uno R3. The DTR line is connected to the reset input of the Atmega328 by a 0.1uF ...
3
votes
1answer
464 views

What USB to UART chip provides highest data rates with Arduino boards?

Checking out online stores for a USB/TTL adapter, I came across a wide range of products, and I'm having a hard time selecting the one which would achieve the highest data rate. I was comparing ...
3
votes
1answer
284 views

Alternative to UART/I2C LCD displays?

I'm building a MIDI synthesizer on Arduino Uno, and am considering user interface options. I see on Adafruit and Sparkfun there are 16x2 LCD panels available that interface via I2C serial or by UART,...
3
votes
1answer
1k views

Is there a way to test whether the UART Tx buffer is empty without waiting?

Is there a way to test whether the UART Tx buffer is empty without waiting? serial.flush() waits, so it won't help me. I tried looking into serial.SerialEvent(), but the link was broken on the ...
2
votes
3answers
5k views

Is it possible to receive a 9 bit protocol on the Arduino Uno with Arduino?

I want send and receive a 9 bit async-serial protocol with 4800 baud on my Arduino Uno, i have read on the specification from the ATmega328P that the uart can do that. My aim is that when my Uart ...
2
votes
3answers
271 views

Control I2C relay board from two Arduino Uno

how can I make multi master Arduino device to work with single I2C device? As both the master device are 20 m away from Slave device, I am using the I2C relay board to connect with 2 Arduino boards ...
2
votes
2answers
1k views

Stopping Serial on RX/TX pins while running Serial on USB

The Arduino/Genuino Micro has RX/TX pins and can do serial via USB. But, Arduinos Serial ties them both together, so when using Serial.begin(9600) to send messages between my PC and the Arduino, I ...
2
votes
1answer
1k views

ESP8266 not able to communicate over serial connection with arduino UNO

This is the code I uploaded in Arduino UNO: #include<SoftwareSerial.h> SoftwareSerial ESP(2,3); // RX, TX //ESP RX-->3(UNO) TX-->2(UNO) void setup() { // Open serial communications and ...
2
votes
2answers
1k views

Is it possible to extract a hex file via UART from an Arduino?

Right now I am tinkering on my 3D printer that has an Arduino mega as a brain. I need to update the Marlin firmware but in case of an error I want to create an backup of the firmware. And because it ...
2
votes
1answer
5k views

Can Arduino Leonardo use USB port and RX TX serial pins at the same time?

Can I use the TX/RX on pins 0, 1 (to a serial slave device) while also having the USB port dedicated PC communication?
2
votes
1answer
488 views

What protocols and tools does Arduino Due use for flashing and debugging?

I am interested in writing a simple C program outside of the Arduino IDE and respective libraries, but deploying it directly to an Arduino Due (which uses a SAM3X8E ARM MCU). I am trying to figure out ...
2
votes
1answer
8k views

Simple Multiple RX/TX SoftwareSerial?

In this project I will be using multiple ESP8266 WiFi modules (4) connected by software serial to an Arduino Leonardo Micro (1 UART). I plan to rotate between all 4 (starting with 2): Open port, write,...
2
votes
1answer
711 views

Arduino serial hex decimal values code

I'm trying to send heximal values from arduino to PZEM-04 power module (it shows voltage, current and ect.) over serial communication in heximal format and get values in decimal format for further ...
2
votes
1answer
181 views

In UART, what mechanism sets the “new data received” flag back to 0?

I was reading documentation on UART on AVR and it looks simple: when a flag (bit RXC0 of register UCSR0A) is set to 1, it means the micro controller has new data for you, and you read this from ...
2
votes
2answers
480 views

UART Software Serial - Syncing two sensors to make a tx and rx beacon

Problem I've been trying to a create a receiver and transmitter beacon for a following robot, but have not been able to sync my two SRF02s to one another. Any advice? Code #include <...
2
votes
1answer
1k views

Custom Arduino library problem

I have made my custom serial(UART) library. So I made uart.h and uart.cpp files as following. uart.h #ifndef UART_H #define UART_H #include <avr/io.h> #include <stdlib.h> //creating ...
2
votes
2answers
286 views

Why is SoftwareSerial causing arduino to reboot?

I'm trying to design an RC controller using an Arduino and an XBee Series 2 Pro. I have the hardware serial running for debug information and I want the XBee to be connected to a soft serial on pins 8 ...
2
votes
2answers
823 views

Matching Baud Rates

So I am working on speeding up a nixie tube speedometer, in this question: , but this brought up another question. Would having matching baud rates for multiple external devices speed up processes. ...
2
votes
1answer
2k views

How to program an nRFL01 RF module that is connected to a pc via a USB to UART/TTL adapter?

In a few of my previous questions I was told that the nRF24L01 RF Module can be connected to a pc using a USB to UART/TTL adapter. After a bit of research I understand that one way to use it is to ...
2
votes
1answer
246 views

Can LilyPad Main Board interface with a sensor via UART?

Is the LilyPad Arduino Main Board physically capable of interfacing with, let's say, a LeddarTech LeddarOne Optical Rangefinder, which has a 3.3v UART interface? I understand that the LilyPad has a ...
2
votes
1answer
2k views

Serial Communication Between 3 Arduinos Doesn't Work (Daisy-Chain)

In my project, I have to send a string from one arduino to a second arduino, and make it send the same string to a third arduino. I used UART and SoftwareSerial library, and connected the arduinos ...
2
votes
2answers
1k views

Error when using USART with Arduino Mega 2560

I use the Arduino IDE 1.6.9 What I want is a DMX Receiver which receives 1 channel and displays it on the serial monitor. When I try to compile the code, I get the following error: C:\Users\Helyx\...
2
votes
3answers
810 views

UART error can not compile on Arduino Yun (ATmega32u4)

This code is used for communication between the Glediator interface and a NeoPixel Matrix, but I receive an error saying 'UCSR0A' is not defined within the scope. UCSR0A |= (1<<U2X0); ...
2
votes
0answers
108 views

Can't connect to my ESP32 board via serial

I'm completely new to electronics work. Today I've received the ESP32 board that I ordered. (It's a WROOM-32.) I followed the instructions here. I connected the board to my computer via USB and I ...
2
votes
0answers
8k views

UART from Arduino to NodeMCU

I'm trying to connect an Arduino nano to a NodeMCU 1.0 via the hardware UART, in order to send information one way from the Arduino to the NodeMCU (and from there to the network). I'm connecting the ...
2
votes
0answers
55 views

Synchronizing two sensors on uart, make one receiver and one transmitter [closed]

I need to make a transmitter and receiver with each specifically transmitting and receiving a signal. I am using two SRF-02 sensors, one is the designated transmitter, the other the receiver. My ...
2
votes
3answers
346 views

UART Software Serial - Syncing two different sensors with start and stop bytes

I'm using 2 SRF02 sensors on the same Arduino board to attempt to have the transmitter only pulse the 40 KHz wave, while the receiver will be only taking a fake range, i.e. picking up a reading based ...
1
vote
1answer
258 views

How to chose softserial library use on Arduino project?

I want to do a project that has multiple Arduino communication through UART, that project project one of limit is using Arduino Nano (small and cheap). I need to set 4 serial port instance on Nano to ...
1
vote
3answers
1k views

Two devices on one UART/Serial

I'm using an Arduino Mega which has 4 RX/TX UARTS/serials. 3 RX's of them I use for MIDI In 2 TX's of them I use for MIDI Out (maybe later a DMX out too) One I use currently for debugging. On the ...
1
vote
1answer
403 views

UART communication issue on Arduino Mega

I am using an MH-Z19 CO2 sensor with an Arduino Mega using UART. As per the specifications of this sensor, after we send a command, we expect the response in a particular 9 byte format (with starting ...
1
vote
1answer
272 views

Accepting strings and integers via UART

My intention is to write a code that asks a user to enter the name and then the age. The code should then simply display the persons name and age. To do that, I have written a simple code. I find it ...
1
vote
1answer
571 views

Cannot control servos through 32-servo-controller on Aurduino Duamilanove

I have servo (TowerPro sg90) connected to 32 servo controller (this one) through UART interface (RX-TX, GND-GND). Seller provide documentation how to connect and control my servos, but it isn't work. ...
1
vote
1answer
29 views

Arduino ESP8266 communication

I saw two peculiar things while googling this subjects. Sometimes Tx and Rx are connected directly despite the fact, that it works on different voltages, sometimes resistor dividor is used, sometimes ...
1
vote
1answer
73 views

HLW8032 UART sends random data ( Registers Overflow often)

I designed my own version of smart socket just like the Sonoff with power metering chip HLW8032. And when I read the data in ESP-12F the data doesn't have a fixed format. To troubleshoot the issue, I ...
1
vote
1answer
19 views

Can I disable the TX pin by setting its mode to INPUT while still receiving data on the RX pin of a UART?

I'm using the ATmega328PB in a personal project with MiniCore. My board streams data in on the RX pin from another microcontroller, but my board also has a DIP switch connected to the TX pin, that's ...
1
vote
1answer
172 views

Serial Communication - strtok() issue

I'm working on UART communication between an ESP32 (sender) and ESP8266 NodeMCU board(receiver). The host is sending out the following character string: Serial.println("2753192144$1&"); The ...
1
vote
1answer
1k views

Super-fast USB communication; how is it possible?

On Arduino forums, there's a post where someone improved the USB communication and made it super-fast. I don't understand how he did this, and I'm trying to recreate this, but failing. My test code ...