Questions tagged [serial]

Serial communication is the standard USB connection between the Arduino and a computer with a standard USB A to B cable or through the TX/RX pins using a USB to serial converter. It can also refer to the serial library.

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

How to serially send a string from Arduino UNO to PIC18F4550? [closed]

I am using a Sparkfun Breakout Barcode Scanner with an Arduino UNO to read specific bar codes. These barcodes are scanned and printed in the UNO's serial monitor. I am having trouble finding a way to ...
0 votes
0 answers
16 views

Controlling dynamixel servo from Arduino-Mega

I was trying to control a dynamixel servo from Arduino Mega. The protocol for the communication is half duplex, and I successfully sent data to the servo motor and got it actuated/turned the LED on ...
2 votes
1 answer
120 views

Curious Collision between OneWire and RadioHead

The code below runs on an Arduino Pro Mini (8MHz 328p) sending temperature readings using an inexpensive ASK transmitter. I use OneWire to read the DS18B20s, and RadioHead to manage the radio. The ...
1 vote
1 answer
18 views

Having issues with RS232 UART wiring to a physical PC connection

TL;DR: Attempting to connect UART2 on ESP32-WROOM to a physical PC RS232 results in odd behavior and ESP32 crashes or errors. Suspect electrical design problems. Wondering if I need special ...
1 vote
3 answers
2k views

FastLed (WS2812B) and IRRemote problem

I am trying to control my WS2812B with a remote control. To archive this, I am using IRRemote library. The problem is that this two libraries doesn't work together. I did some research and found out ...
0 votes
1 answer
34 views

Sketch halts if button is pressed on boot

I have a KY-040 rotary encoder with a push button wired to an ESP8266. My objective is to be able to detect if the button is pressed or not on boot. In the below code, if I hold the button down and ...
1 vote
1 answer
49 views

Can't get serial port's attention once sketch is running

This sketch is supposed to listen for a single character sent to the serial port, as a means of starting and stopping data collection (which in this example is mocked by printing some register values)....
1 vote
1 answer
52 views

Multiple symbol definition related to USART_RX_vect from Serial

When trying to compile the sketch below, I get this error when using either the IDE or the CLI: HardwareSerial0.cpp.o (symbol from plugin): In function `Serial': (.text+0x0): multiple definition of `...
70 votes
12 answers
443k views

How do I split an incoming string?

I am sending a list of servo positions via the serial connection to the arduino in the following format 1:90&2:80&3:180 Which would be parsed as: servoId : Position & servoId : Position ...
0 votes
1 answer
131 views

Serial communication with HC-05 - Arduino UNO

I am new to the site and this is my first question. I'm going to try to describe my issue the best I can. I got the following code for my project, which consists basically of getting a car to have 2 ...
2 votes
1 answer
238 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
2 answers
395 views

Arduino receive response from SIM800H to AT+CCLK? command

I've been trying to make a program that interacts with SIM800H trough AT commands. It worked with the String class, but it was full of "memory leaks" and after a few hours it just hanged. ...
1 vote
1 answer
63 views

Transmitting voice via VLC

The project I'm working on: Short-Range Coded Visible Light Communication System. Visible Light Communication (VLC) systems use light to transfer data between transmitter and receiver over short-range ...
2 votes
2 answers
1k views

Need ESP32 to use 3 serial ports

I have a project that needs 3 serial ports on my ESP32 Dev 38-pin MCU. Two of them are for Nextion touch displays and the other is for a GPS. The problem from what I understand is that the ESP32 has 3 ...
0 votes
1 answer
78 views

How does the serial monitor know where a string terminates when we use Serial.print instead of Serial.println?

EDIT: I thought I had to parse the things coming into the program but the speed it is running at makes it indistinguishable to the eye that the word is being printed piecewise. I am trying to create a ...
1 vote
1 answer
689 views

Sending servo position data from one Arduino to another

I'm trying to take the position data generated from this servo sweep, and send over serial to another Arduino. The position data is stored as pos in the code I included, what would be the best method ...
0 votes
3 answers
74 views

Arduino interrupt for serial data on digital pin, that is too large for the serial buffer

I am using an Arduino Nano in combination with a NEO 6m GPS module. The GPS module is sending data, consisting of a few hundred chars, every second. Since I am communicating with my PC over the ...
-1 votes
0 answers
57 views

DMXSerial receives random 0s

I am using the DMXSerial library to receive a value between 0-255 on a certain DMX channel. However the received value flips between 0 and the value I am expecting to receive. I could debug this with ...
0 votes
1 answer
112 views

Construct Strings with UTF-8 characters from data

I am printing some ASCII art to the Serial monitor from Arduino UNO, with some success. However, using string literals uses more memory than I would like. I wanted to try constructing the strings/...
-1 votes
3 answers
56 views

Shared memory space for locally defined buffers?

Within a class I have a method that is using a basic char buffer to print some data, something like char buffer[64]; sprintf(buffer, "%s: some text: %u, %u, %u %u", string_var, u_var1, ...
3 votes
2 answers
676 views

Bluetooth communication not working with DC power but works with USB power?

I am running an HM-10 Bluetooth Low Energy (BLE) module to transmit serial data (using SoftwareSerial) from an analog sensor onboard my Arduino Uno to a serial terminal app on my Android phone. When I ...
0 votes
4 answers
190 views

UART - Different results between logic analyzer and an Arduino

I would like to decode a serial communication. I have already found out how the protocol works. I can also send serial data with my logic analyzer and control the device this way. I would like to ...
1 vote
2 answers
764 views

How to debug MIDI input?

I'm trying to receive MIDI messages on a Leonardo. To do that I used the circuit in the diagram below (only the top half for receiving). The only thing I did differently was using an 1N4148 diode ...
0 votes
1 answer
31 views

UCSR0B equivalent for ESP2866

I'm trying to convert an Arduino Uno program for use with the ESP2866. I've converted most of the program successfully, but there are a few lines I can't seem to figure out. For example, UCSR0B = ...
0 votes
2 answers
71 views

Which sketch was this?

With ESP32 being so plentiful here (3 more for Christmas) I am at a loss to determine which sketch I used for a particular unit. Has anyone devised a record keeping scheme or even a serial monitor ...
0 votes
2 answers
2k views

Arduino Serial Monitor works but not on PySerial and PuTTY [closed]

I made simple custom arduino board using an atmega328p and the PL2303 serial to USB chip. In my arduino program, I am in a loop that sends out a string continuously. I can read this in the Arduino ...
0 votes
2 answers
157 views

Why I always see while(serial.available() > 0) as the standard way of reading serial data?

Examples online always show this code to read bytes from the serial interface: while(serial.available() > 0) { char receivedByte = serial.read(); } But I don't understand why it works. The ...
2 votes
1 answer
2k views

Laser emitter + receiver for Arduino (Arduino to Arduino communication)

I'm working on a project using 2 Arduinos connected to 2 computers to demo Serial to Serial communication. We're using Arduino Uno connected to the computer via Serial and software serial for inter-...
44 votes
4 answers
49k views

Why does starting the serial monitor restart the sketch?

If I upload any sketch that sends serial data, I immediately see the TX/RX LEDs flash once the sketch is uploaded. If I then start the serial monitor, the sketch appears to restart. A bare minimum ...
-1 votes
1 answer
99 views

Reading serial data from Arduino in Python continually

Using a stepper motor and a range finder (TFLuna), I am trying to build a "Lidar" (like a Radar, but with light). Here is the algorithm: Turn motor one step, calculate angle, measure ...
1 vote
2 answers
190 views

Why can't I upload a sketch by connecting directly to the serial pins?

I have an handful of fake arduino nanos. The work fine, but as an experiment, I tried to program them with a usb serial adapter (a real FTDI one). It doesn't work, but also, strangely, it seems to ...
-1 votes
1 answer
62 views

Compilation error: 'Serial' does not name a type [closed]

#include <IRremote.h> IRrecv IR (11); Serial.begin(9600); void setup() { // put your setup code here, to run once: IR.enableIRIn(); } void loop() { // put your main code here, to run ...
-1 votes
1 answer
74 views

Arduino not reacting sometimes when reading serial commands

When I am sending hex numbers via computer to the arduino leonardo, it sometimes won't react, but the serial monitor says that it was sent. My code; void setup() { Serial.begin(9600); pinMode(...
48 votes
21 answers
141k views

Serial data plotting programs

I need to plot serial data from Arduino. I require support for: Various data formats (e.g. signed, unsigned, 8 bits, 16 bits); Plots several data on the same axes; Exports / Imports file data. As ...
-1 votes
1 answer
130 views

ESP32 cannot serial monitor [closed]

I use esp32 devkit v1 . I code follwing this picture. const int vavle = 1; int d = 1; void setup() { Serial.begin(115200); delay(2000); while (!Serial); Serial.println(); pinMode(vavle,...
4 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 ...
0 votes
2 answers
1k views

Serial to USD (HID keyboard device) converter

I am working on a project to collect data from a barcode scanner using an Arduino, which in turn is connected to a POS/laptop. So far I am able to collect the data from the barcode scanner by using ...
1 vote
1 answer
1k views

USB serial port no longer detected after successful upload

I successfully uploaded a sketch to my Arduino Micro using the USB serial port but if I try to change the sketch that port is not available. The sketch I uploaded on the Micro runs fine when I plug in ...
0 votes
0 answers
279 views

ESP32 S3 Same code works on Serial1 but NOT on Serial0 for RS485 module

I have designed a test board to understand ESP32-S3 working pins. I am using USB interface D+, D- for programing so Serial0 is free to use. This is my test circuit for testing an RS485 converter. For ...
1 vote
0 answers
997 views

esptool.py error Cannot configure port, something went wrong. PermissionError(13, 'A device attached to the system is not functioning.', None, 31)

When trying to upload my firmware to an ESP8266 board using Arduino IDE 2.2.1 I get A fatal esptool.py error occurred: Cannot configure port, something went wrong. Original message: PermissionError(13,...
-3 votes
1 answer
92 views

RF24 if statements are not reading properly, even if an "if" value is wrong, it still follows the associated code [closed]

My code is taking values from a remote and transmitting the state of it. Right now the states are just 1 and 0, on or off, and is writing over the serial monitor on the transmitting Arduino. On the ...
-1 votes
1 answer
53 views

Reading a string from the serial port and comparing to another string

I'm using an Arduino Mega 2560 and writing a really simple piece of code that doesn't work. String a, letra; #define led 13 void setup() { Serial.begin(9600); // opens serial port, sets data rate ...
0 votes
2 answers
47 views

Serial Buffer stays empty as soon as it becomes empty once

I have a question regarding serial buffer readout. At program start, I send a serial command to a sensor that 1. activates him and 2. let him send data - that works. When I unplug the sensor, the ...
15 votes
3 answers
99k views

Use all pins As digital I/O

Increase the number of digital pins There are many post that explain how to use more than just the standard pins on the various arduinos but none of them explain the limitations and the proplems ...
5 votes
3 answers
2k views

Arduino to Arduino communication

When I send data to an Arduino Uno via the serial monitor, the serial data goes down the same USB cable used to program the Arduino. So there must be a device on the Arduino board like a FTDI or USB-...
0 votes
1 answer
119 views

Python script cannot connect to serial port

I want to control the LEDs with my hand, for this I used the repository https://github.com/paveldat/finger_counter/tree/main. I want to control the LEDs with my hand, for this I used the repository. ...
-1 votes
1 answer
43 views

Wolfram Mathematica reads but closes stream feeds from Arduino Serial port after a few data sets

This is a Wolfram Mathematica / Arduino serial feed problem , but I am posting here just in for any suggestions on enhancing the Arduino code or the Mathematica notebook. The original post is here ...
-1 votes
1 answer
216 views

convert string representing a binary number to binary

I have a serial input "1111111" and I would like to convert this to a binary B1111111 that I can send to a led matrix. I tried to search, but, all the results were misleading, led to full ...
0 votes
0 answers
191 views

Arduino Uno RFID-RC522 won't scan any card or tag

So I bought a RFID-RC522 module with a blue tag and a white card, and I searched for tutorials and found this library that I used it. and here is my code : #include <MFRC522.h> #include <SPI....
-1 votes
1 answer
64 views

Read byte and time into EEPROM, then display with a comma between the time and the value?

I have bytes of natural numbers 1-60 coming in at random times: Example of send data // Uno send void setup() { Serial.begin(9600); int integersToSend[] = {1, 22, 30, 4, 50}; for (int i = 0; ...

1
2 3 4 5
43