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.
245
questions
14
votes
1
answer
28k
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 ...
14
votes
1
answer
375
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
1
answer
718
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 ...
7
votes
2
answers
12k
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 ...
6
votes
3
answers
4k
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 ...
6
votes
3
answers
12k
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 ...
5
votes
1
answer
2k
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
2
answers
5k
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 ...
5
votes
2
answers
3k
views
When it comes to UART to RS485 communication, what is the difference between the 'MAX485' and the 'HW-0519' module?
I recently found this model with the ID 'HW-0519' on it. It can be found online (HW-0519 in Aliexpress) and is sold for the purpose of converting UART to RS485 communication using Arduino devices. The ...
4
votes
4
answers
2k
views
Bi-directional UART communication on single data wire, possible?
The nano is inside of the house, and the pro mini is outside of the house. I want to send/receive text between them. The communication will be always nano sending text to mini, and then mini sending ...
4
votes
1
answer
8k
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?
4
votes
1
answer
6k
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 ...
4
votes
1
answer
3k
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 ...
4
votes
1
answer
8k
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 ...
3
votes
2
answers
1k
views
How to upload code without closing puTTY
My question is quite simple: can you, somehow, upload Arduino code without closing puTTY's serial console? I hate having to close the program to open it again for reading the incoming information.
3
votes
3
answers
5k
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
2
answers
1k
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
1
answer
703
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
4
answers
4k
views
Best buffering practice for continuous SD card writing
In a simplified example, I have a microcontroller functioning as a data acquisition device - sensor data is received over UART, and then saved to an SD card.
This received data is in the form of a 12 ...
3
votes
1
answer
674
views
Arduino UARTS Auto addressing slaves
i'm using this serial topology to connect my Act ATmega328p (Arduino) slaves together to a master ESP32.
They are in total 10 ATmega328p slaves and one master:
With this type of wiring i'm sure that ...
3
votes
2
answers
3k
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 ...
3
votes
3
answers
586
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 ...
3
votes
1
answer
3k
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 ...
3
votes
1
answer
64
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 ...
3
votes
2
answers
270
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
1
answer
747
views
ESP send string to Arduino
I'm trying to send a string from an ESP32 to an Arduino. I'm using a level shifter, where the Uno is now the Mega (since I couldn't get the Uno to work).
RX0 is now RX1, connected to UART2 of ESP32.
/...
3
votes
1
answer
5k
views
I2C communication between Arduino Uno and Nodemcu32-s (ESP32)
I want to send data between an ESP-32 (NODEMCU-32S) and an Arduino Uno but I haven't found any source on how to do that, so I tried this code:
ESP-32 code:
#include <Wire.h>
void setup() {
...
3
votes
1
answer
780
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
1
answer
3k
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 ...
3
votes
1
answer
352
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 ...
3
votes
1
answer
2k
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
2
answers
9k
views
Send structure through Serial
Suppose that one defined a data structure and wanted to send it through serial.
struct Gyro_data_structure {
char command_name[5];
float gyro_X;
float gyro_Y;
float gyro_Z;
};
...
2
votes
3
answers
7k
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
2
answers
156
views
Trying to understand the bottleneck of sensor sampling rate
Lets say I have a sensor connected to Arduino Uno Rev3's I2C Bus. I am reading the sensor output and using Serial.print() to send the sensor reading back to a my laptop.
I am trying to understand the ...
2
votes
2
answers
1k
views
Am I at the limit of UART transmission time?
I'm currently using an STM32F103C8 (With an arduino core) to read 4 sensors at 1kHz, then send that data via UART (at 115200 baud) to another device. Each sensor returns a float, I also include an ...
2
votes
1
answer
13k
views
How to use Serial.setTimeout()
I am just playing with the UART interface of my board to learn about how it works. Since I have only one board, I send data out just to receive them by my own board, which is working so far.
Now I ...
2
votes
3
answers
400
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) ...
2
votes
1
answer
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
1
answer
775
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
4
answers
463
views
Atmega168 breaking out of ISR
I wrote a code to handle an ISR triggered by UART input. I'm looking for 2 characters or more. I can handle extra characters and garbage values, but problem arises when I get less than 2 chars, ...
2
votes
1
answer
524
views
Is it possible to use UART0 freely when connecting ESP32 s3 via USB (D+, D-)?
I've designed a test PCB that utilizes an ESP32 S3 and testing pins. During program uploads, I use the USB interface over GPIO20 and GPIO19 as D+ and D-. Everything works fine in this configuration. ...
2
votes
1
answer
320
views
Why are the UART ports not working on my Portenta breakout board?
I am using a Portenta Arduino Breakout Board that is connected to the Portenta H7 for a project I am working on. The project requires me to use three Adafruit Ultimate GPS sensors and connect each to ...
2
votes
1
answer
488
views
Unable to upload sketch to Lolin S3 Pro (ESP32-S3)
I'm trying to upload a simple sketch to the new Wemos Lolin S3 Pro but unfortunately I can't seem to get it to work. I get the following error message:
Connecting......................................
2
votes
2
answers
249
views
Why does controlling power with a transistor interfere with MHZ19B's serial communication?
I've been trying to turn off an MHZ19B (datasheet and teardown photos: revspace.nl/MH-Z19B). I've used an Arduino, NPN, PNP transistors and mosfets as well as the diagram below for connecting the ...
2
votes
1
answer
16k
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
1
answer
4k
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
1
answer
1k
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
1
answer
513
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
2
answers
639
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
2
answers
402
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 ...