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

Problem flashing Arduino Uno [closed]

I'm using an Arduino Uno to control some 12vdc motors and I think i may have burned my Arduino. When removing the hardware from the chip, I accidentaly touched some ICSP pin with 12vdc, the board ...
Eduardo Antonine's user avatar
-1 votes
1 answer
29 views

Multiple errors: expected primary-expression before ',' token [closed]

I'm getting so much errors and I don't understand why. This is my code from Energia for MSP430. #include <SoftwareSerial.h> #define pinLed P3_5; #define trigPin P4_6; #define echoPin P4_5; ...
Razvan Vlad's user avatar
-1 votes
1 answer
28 views

Fail to discard the character T from my transmitter Arduino

I wrote code for my transmitter Arduino. I want to send the data to the receiver Arduino through Tx and Rx serial. The issue is that I could not discard the char "T" and it appears as output ...
anwar alfawdaei's user avatar
1 vote
3 answers
119 views

Serial.println printing just after the previous string in same line

I wrote serial.println in my code but the string was printed in same line on serial moniter. #include <WiFi.h>//for connecting esp32 to a wifi #include <TinyGPS++.h>//to obtain gps data ...
Yug Ahuja's user avatar
1 vote
1 answer
47 views

Arduino board with StandardFirmata doesn't respond to C# and Python client

I have a Seeeduino XIAO board with Firmata running on it. I'm currently trying to write C# client to communicate with this board. I have tried using Iot.Device.Arduino, SolidSolis.Arduino and ...
Cregennan's user avatar
1 vote
1 answer
48 views

Bad symbols in the serial monitor when connected via USB 3.0

I tested DHT11 + Arduino Uno with a very basic example sketch. The Arduino board was connected to USB 3.0 and sometimes I saw incorrect symbols in the serial monitor, e. g. "Humidit?: _7%" ...
Mik's user avatar
  • 149
2 votes
2 answers
131 views

interrupt from a button and wait until serial port 1 has a message

I'm a little bit loss because I'm learning how to use the interruptions on Arduino. I'm creating a program to read an RFID code that arrives if an RFID transmitter is close to the antenna (a little ...
Aeva's user avatar
  • 23
0 votes
0 answers
38 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
31 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
42 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
59 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
93 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
86 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
308 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
102 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
61 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
203 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
39 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
73 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
191 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
123 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
77 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
78 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
172 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
447 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
  • 287
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
93 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
53 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
175 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
44 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
346 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
243 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
70 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
58 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
154 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
86 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
65 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
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 ...
rcs13's user avatar
  • 21
2 votes
0 answers
84 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
70 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
83 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
78 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
189 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
213 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
227 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
170 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
101 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
147 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

1
2 3 4 5
43