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
19 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 ...
Lawliet's user avatar
  • 183
1 vote
1 answer
25 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 ...
Jason Rohm's user avatar
0 votes
1 answer
36 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 ...
Lachlan Etherton's user avatar
1 vote
1 answer
54 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)....
Bryan Hanson's user avatar
1 vote
1 answer
60 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 `...
Bryan Hanson's user avatar
0 votes
1 answer
79 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 ...
Aman's user avatar
  • 3
0 votes
1 answer
144 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/...
Hubert B's user avatar
0 votes
3 answers
81 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 ...
Vincent Pruy's user avatar
-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, ...
ImogenWren's user avatar
0 votes
4 answers
195 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 ...
user avatar
0 votes
1 answer
33 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 = ...
blk986's user avatar
  • 1
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 ...
jansellsbond's user avatar
0 votes
2 answers
163 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 ...
Gianluca Ghettini's user avatar
-1 votes
1 answer
111 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 ...
Matthias's user avatar
  • 101
-1 votes
1 answer
68 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 ...
maxerex's user avatar
-1 votes
1 answer
77 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(...
Kyle_3_1415's user avatar
-1 votes
1 answer
136 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,...
poom's user avatar
  • 11
0 votes
0 answers
311 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 ...
mehmet's user avatar
  • 277
1 vote
0 answers
1k 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,...
James Lafritz's user avatar
-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 ...
Bradbut's user avatar
0 votes
2 answers
50 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 ...
Gymknopf's user avatar
0 votes
1 answer
126 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. ...
Дмитрий Насонов's user avatar
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-...
Neil Stockbridge's user avatar
-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 ...
Jose Enrique Calderon's user avatar
-1 votes
1 answer
240 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 ...
vilmarci's user avatar
  • 109
0 votes
0 answers
204 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....
Mr Code Gamer's user avatar
-1 votes
1 answer
65 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; ...
adamaero's user avatar
  • 198
-1 votes
1 answer
57 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 ...
Carlos Eduardo Carvalho's user avatar
1 vote
1 answer
136 views

ArduinoJson reading `null` from Serial

I have a setup that reads from serial when I sense that there is something to be read (and always assume that what is sent to the arduino is valid json): void setup(){ Serial.begin(9600); ...
Snappawapa's user avatar
-1 votes
1 answer
54 views

Serial does not read buffer with integer characters greater than 43

I'm trying to write a script to move an object coupled to a linear axis through a stepper motor. The user must send information such as the length to be moved, the speed of movement, the direction of ...
Yan Araújo's user avatar
-1 votes
1 answer
83 views

Lilypad sends corrupted data on Serial

I have an Arduino Lilypad with this simple code where I try to write a simple message to the serial console. The baud rate is set to 9600 both in the code as well as in the serial console and I'm ...
Jozef Cipa's user avatar
0 votes
1 answer
63 views

Make my Arduino (Mega or whatever is better for the task) to be able to read and write `Serial` data to a **rj45** port

I have a Chinese hybrid solar inverter that exposes an rj45 input which talks the serial protocol (Baud rate 2400, no parity, 8 bits, 1 stop bit). I need my Arduino (say, Mega or whatever, does not ...
Zazaeil's user avatar
  • 111
2 votes
1 answer
256 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 ...
rcs13's user avatar
  • 21
2 votes
0 answers
78 views

I have a cash counter with RS232 in the back of it, I want to read the data that supposed displayed on the projector

I have cash counter with RS232 in the back of it. I want to read the data that supposed displayed on the projector with RS232 to TTL convertor and arduino. Here is all my setup Now I Connect the ...
Mohammed A. AL-Dainee's user avatar
0 votes
0 answers
68 views

Arduino MKRZero "This device cannot start" (Code 10), and Keyboard.h

I have bought my brand new Arduino MKRZero to emulate a keyboard. When I plug it in, I get the following on COM6, which is listed as "Arduino MKRZero". "This device cannot start" (...
HFOrangefish's user avatar
0 votes
1 answer
68 views

How to fix UnicodeDecodeError when using Serial.println

I am using an Arduino Uno R3 to send instructions to a serial monitor in a Python program with Serial.println. But when I send a specific line, I get a a UnicodeDecodeError. The line in the Arduino ...
stanley's user avatar
  • 107
2 votes
0 answers
66 views

Slow I2C communication

To collect temperature and BPM, I connected a max30101 in my Heltec WiFi kit V3 with ESP32. The data collected are stored in arrays to extract statistical features from signals which an algorithm will ...
Alice's user avatar
  • 31
1 vote
1 answer
172 views

Why this simple serial monitor code not working?

The follwoing code echoes whatever arduino recieves through reciever pin. The idea is that arduino will echo whole data in the buffer on the same line and starting from the new line while echoing the ...
dRIFT sPEED's user avatar
0 votes
1 answer
192 views

ESP8266 serial monitor spitting out garbage

I am trying to set up a weather station, and I should just have the anemometer left. This code works fine (as far as I know). // Pin definitions const int reedSwitchPin = 2; // Variables volatile ...
Iliketurtles's user avatar
0 votes
1 answer
212 views

sim800l gsm module response isn't completed

I am using the sim800l gsm module with nodemcu esp8266 and comunicating with it using AT+ commands. The module is working correctly but I am trying to use the command AT+CLCC to get all the current ...
Mohamed Essam's user avatar
1 vote
1 answer
130 views

HardwareSerial and SoftwareSerial not compatible

The HardwareSerial requires to run an interrupt to store received bytes in the buffer. Look at this file from the Arduino Core. If I am now constantly receiving and writing on the Software Serial, the ...
RenX's user avatar
  • 127
-3 votes
1 answer
94 views

SoftwareSerial and HardwareSerial lost data

I need two Serial ports. One port is some sort of modified Software Serial, where I have to be listening constantly and send responses immediately if the port requires it. There is no XY problem ...
RenX's user avatar
  • 127
-1 votes
1 answer
131 views

Arduino Uno WiFi Rev2 is sending serial data to IDE, but not to C# program

I have an Arduino Uno WiFi Rev2 which I am trying to read data over the serial port from (using C#). The Arduino program periodically emits data to the serial port (for testing purposes). Whenever the ...
Hemisphera's user avatar
0 votes
1 answer
257 views

Why is the serial monitor not printing a variable?

I connected an Adafruit color sensor to my Arduino and am having it make calculations. However, when the calculations are done and sent to the serial monitor, it says "NDVI: " without ...
Chris's user avatar
  • 3
3 votes
1 answer
214 views

How to ignore garbage values in serial communication between arduino and python

I have arduino uno. I am trying to send and receive serial data from arduino to python. I have usb to uart converter. I have connected its tx to rx of Arduino and rx to tx of Arduino and gnd is ...
S Andrew's user avatar
  • 183
1 vote
3 answers
703 views

Best way to send a boolean (1/0) to a windows application in real time?

I have an arduino mega connected to a light sensor that reads the status of a machine's indicator light. I have a C++ application that controls the machine, and I would like the arduino to send the ...
Max Bluhm's user avatar
2 votes
1 answer
408 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......................................
shyney's user avatar
  • 73
4 votes
0 answers
53 views

Can I use regular pins (Example: D2, A3, etc...) as serial (RX, TX)?

Python/Arduino Beginner here... I have a DFplayer I am trying to hook to my Arduino and I want to hook it up through the regular pins instead of the RX and TX pins, but I've not been able to find ...
prestonferry's user avatar
4 votes
2 answers
117 views

Arduino unable to read 0x41 and 0x42 (reads others just fine (ICT bill acceptor)

Here is my issue: My code successfully recognizes and accepts $1 (0x40) and $20 bills (0x43), but it fails to recognize, display, process, anything for the $5 bill (0x41), and $10 bills (0x42). Also, ...
Mappy Wilks's user avatar
3 votes
0 answers
64 views

nano 33 BLE problems with reading RC signal

I'm using an Arduino Nano 33 BLE and a L293D motor driver to control a three-wheeled RC robot. The sketch I'm using worked fine with my Uno Rev3, but I've moved to the Nano for size/weight reasons, ...
starthrow's user avatar

1
2 3 4 5
43