Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
3answers
97 views

Unexpected accident of my board, CH341 issue for Linux or Dead ESP?

I have early midnight accident of my Lolin/Wemos boards. I tried uploads my sketch with a assembly VIN to GND as my reset button, when i uploads my sketch at more one hundred times, i get my boards ...
1
vote
0answers
53 views

Keypad prints just 1 [closed]

I used this example code: #include <Keypad.h> const byte ROWS = 4; //four rows const byte COLS = 4; //four columns char keys[ROWS][COLS] = { {'1','2','3','A'}, {'4','5','6','B'}, {'7','8'...
0
votes
1answer
51 views

Serial Moniter is repeating output

I do apologize for the constant posts on here. However I ran into an issue and I cannot seem to find any solution to it. The goal is to enter a username, through the Serial.read function, and if the ...
0
votes
0answers
26 views

How can I read the serial output of STM32F103C8T6 from USB to Serial TTL?

I recently bought a STM32F103C8T6 board (blue pill) I programming to it using the USB to Serial TTL I bought (CP2102). I'm still taking very first steps and trying to figure out how to operate the ...
0
votes
1answer
43 views

LDC paired with Arduino locks up and freezes. Out of SPRAM?

I am making an alarm clock using a 4x20 lcd display, rtc, and Arduino Pro Mini 3.3v. I have implemented a menu system for setting the time/date that blinks the text on the lcd display to indicate that ...
2
votes
2answers
73 views

Serial monitor returns “48” when I enter “0”

I am going through an Arduino Learning Book(978-1-59327-448-1) and I've run into the same issue twice now. When I enter data into the serial monitor, the number that it reads and displays(when asked ...
0
votes
1answer
114 views

No data sent over serial port in linux c++

TL;DR - I am attempting serial communication with Arduino with code that I found here and nothing gets sent over (Arduino programmed to respond, and I checked that it does with its serial monitor) Hi ...
0
votes
1answer
63 views

Using Arduino UNO for uploading a sketch to the Espresso Lite v2

I am trying to use my Arduino UNO as a programming interface to load sketches on the Espresso Lite v2. I followed the instructions to setup the Wifi network (long press gpio13 and the AP thing), but ...
0
votes
1answer
49 views

If/Else Statements on Arduino not executing

I have a bit of code below, the problem is only the first 'if' statement will execute when called on. When I call on u, q, or any of the other if statements it will go straight to the else and not ...
0
votes
1answer
32 views

Why does my Esplora only send serial data when the serial monitor is on?

I've noticed that when I'm sending serial data to my computer's serial monitor, the tx light only lights up when the serial monitor is open. When I close the monitor, it seems to stop sending data. ...
0
votes
1answer
77 views

CH340G and CP2102 devices not recognized with Thinkpad L380

I have three different devices, none of them gets recognized on my new Thinkpad L380 running Windows 10: Arduino Nano Clone with CH340G chip (USB2Serial) NodeMCU (Lolin V3) with CH 340G chip (...
0
votes
1answer
33 views

Serial communication between an Uno and an Esplora by connecting their usb ports together

I’m trying to send a character message from an arduino uno to an esplora by connecting their usb ports together. The esplora has a micro usb port, while the uno uses a usb B port. To hooked them up, ...
1
vote
2answers
44 views

Two floating point values do not get added and printed on ESP-WROOM-32

I have a Olimex ESP32-PoE board which has a ESP-WROOM-32. I just found out a strange behaviour for printing floating point numbers on the board. Sketch void setup() { // put your setup code here,...
0
votes
2answers
113 views

Arduino Hello World in Serial monitor

Hi we were asked to program something which when i enter something in the serial monitor it prints Hello world but the catch is it only prints hello world under the conditions that your input in the ...
0
votes
3answers
120 views

formatting strings in Arduino for output

I wander what is the best option for formatting strings in Arduino for output. I mean what's a preferable way in the point of view of performance, memory usage – things like that. I see, people ...
0
votes
1answer
226 views

Serial communication mac to Digispark ATtiny85

I want to use the Arduino IDE serial monitor with my Digispark ATtiny85 over USB. I can without problems upload this code(Digispark CDC example): #include <DigiCDC.h> void setup() { ...
0
votes
1answer
596 views

Arduino Convert std:string to String

I'm working on BLE project with espressif library. And It returns me founded BLE device. std::string getManufacturerData(); std::string getName(); int getRSSI(); BLEScan* getScan(); When ...
2
votes
1answer
258 views

“char inChar = (char)Serial.read();” why is the “char” in brackets? and what is it called

I am sure this is a very simple answer, but I don't know to look it up on google In the example "SerialEvent" in the arduino IDE (v1.8.7), there is the following function void serialEvent() { ...
0
votes
1answer
27 views

SIM808 return the same AT command

I am using atmega 2560 and SIM808. When I send an AT command to SIM808 it returns correctly. But sometimes I have seen that SIM808 returns the same AT command. Sometimes it occurs due to lack of power ...
0
votes
1answer
60 views

Can't write to serial immediately from PC to Arduino nano via pl2303 usb to ttl converter

Goal: I am trying to send some characters to Arduino through serial from PC via a Prolific PL2303 USB to TTL converter(Chinese clone). I have wrote a simple sketch(attached bellow) which should ...
1
vote
1answer
59 views

Writing and reading an ID to/from an Arduino reliably

I need a way to both ID (a sketch/compiled hex) and later on, identify based on this ID the project that got uploaded to my Arduino microcontroller. As of right now, I have explored multiple options ...
1
vote
2answers
60 views

Arduino serial question [closed]

just a quick question on an oddity I noticed while playing with serial on my Arduino. I'm using the serial monitor to test an interface I plan to adapt to Bluetooth later. Except I'm noticing if I ...
0
votes
1answer
30 views

Unable to receive data when using multiple SoftSerial on Arduino Nano

I am trying to use several (four) software-based serial ports to talk to different peripheral hardware. However, I am unable to receive data through the SoftSerial when using more than one software ...
0
votes
0answers
30 views

Arduino Pro Micro and RFID-reader

I've written some code for reading RFID-tags that works perfectly with my UNO. No issues at all. Problem is, the UNO is 1) too large, and 2) lacking USB interface, which I want in order to transfer ...
0
votes
1answer
28 views

How to Create a reference to an External Print object

Right now I have an object: class Dog { public: Dog(uint8_t I2c, Stream& feedback); void Speak(); private: uint8_t _I2c; Stream& _output; }; Dog::Dog(uint8_t I2c, Stream&...
0
votes
1answer
109 views

array to serial

i want to send an array of int to another arduino by serial. To garantie a better robust during the transmission, i added < and > with endMarker and startMarker. The receiver wait until the ...
4
votes
3answers
1k views

Why is Serial.Write that slower when writing x+1 characters than when it is writing x characters?

Using Serial.Write() in a time sensitive application. I realize that the number of characters being written not only had an impact on the time spent writing in the buffer, but actually had a bigger ...
0
votes
1answer
32 views

Using serial.available to return number of bytes

My code: char data; int numOfBytes; void setup() { Serial.begin(9600); } void loop() { if (Serial.available() > 0) { int numOfBytes = Serial.available(); Serial.print("...
0
votes
1answer
471 views

Serial communication between python and arduino

I am working on object tracking robot. I am using python and OpenCV to detect the object and send the proper data to the arduino that controls two servo motors. The data which should be sent to the ...
1
vote
2answers
78 views

Two serials can't work on the same speed

I have a device which sits on pins 10/11 of Arduino UNO. I am trying to send commands from my PC using Arduino to relay my commands to the device via Serial. The problem is that if I use speed 9600 ...
0
votes
1answer
34 views

MAX232 chip fails to initialize properly with arduino

I have connected a MAX232 chip for RS232 communication with my Arduino. The chip input is connected to Arduino Tx and it is getting power from external 3.3 volt dc power source. My Arduino is also ...
0
votes
1answer
157 views

“'serial' not declared in this scope” error [closed]

I'm trying to make a basic potentiometer with a startup kit using the following code: const float referenceVolts = 5.0; const int batteryPin = 0; void setup() { serial.begin(9600); } void loop() ...
1
vote
2answers
86 views

Using a analog multiplexer to use 9 serial input sensors?

I have 9 sensors, they will send a datastring to my Arduino through Tx/Rx (every 3½ seconds, pre-programmed). The only problem is that there's only one Tx/Rx port on an Arduino Uno. Is it possible to ...
0
votes
1answer
102 views

Passing HardwareSerial and SoftwareSerial as a Class Property

I wish to know if there is a way to use a single property Serial0 to hold a HardwareSerial or a SoftwareSerial or other class instances supporting basic methods such as available(), read() and write(),...
2
votes
1answer
156 views

How can I detect which baudrate a virtual COM port is set to?

I would like my software running on Leonardo to behave differently depending on the baudrate of the USB Serial set by the PC. For example, I want to make a smart USB to UART converter which performs ...
0
votes
1answer
69 views

Cannot get Serial working

I've bought a module which should communicate via serial RX/TX. The module and code are described here: https://www.dfrobot.com/wiki/index.php/Weather_Station_with_Anemometer/Wind_vane/Rain_bucket_SKU:...
1
vote
1answer
92 views

How to convert 0-5v inverted serial to 0-3.3v non-inverted serial

This weather stations has a 0-5v serial output. I'm trying to read the serial output with the Adafruit 32u4 feather board and I get nonsense data out of it. When I hook the Ultimeter up to my serial-...
0
votes
1answer
50 views

Is two modules using Serial Interface on one Arduino Uno possible?

I was wondering if I have both a Bluetooth HC-05 module and a GPS module (uBlox 7N) is it possible both for both to be using the serial interface? I'm aware they cant be operating simultaneously ...
1
vote
2answers
49 views

Arduino Uno won't upload code and overheats

We are using an Arduino Uno R3 connected via USB to a computer. The main problem is that we can't upload any code to the board. We get this error in the Arduino IDE console: avrdude: ser_open(): ...
0
votes
0answers
111 views

Controlling slide projector with Serial

Edit 2: The problem with the RS232 to TTL converter is that pins 2 and 3 are switched, so rx is on pin 3 and tx is on pin 2. This appears to be common and can be solved by either rewiring the DB9 ...
0
votes
1answer
117 views

PMS5003 Serial Output Data to SD Issues

I'm trying to save the output of an air quality sensor to a SD card, but I'm having a few issues. The sensor I'm using is a Plantower PMS5003 which puts out its data via serial. I've heavily tweaked ...
0
votes
2answers
30 views

Potentiometer reading out letters

My potentiometer reads out t's or u's in my serial. I believe that my potentiometer is wired correctly. What am I missing? Here is my code: #include <VarSpeedServo.h> VarSpeedServo servo; ...
0
votes
2answers
43 views

Arduino Serial Writing Array Problem

I am trying to communicate Pc - Arduino Uno. My Arduino code is here: (It is working as below) int ndx = 0; char pack[12]; void setup() { Serial.begin(9600); while(!Serial){;} } void ...
1
vote
1answer
38 views

Doubt using character array

I'm trying to make a led sign with a WS2812b ledstrip, using the FastLed library (by the way, this is a great library!), I'm already able to show a text (so far only one, which I leave saved in an ...
2
votes
1answer
133 views

Problem with serial connection. Data garbled

I have a hardware device that sends data over the serial port and over a socket connection. I have the TX of the device connected to the RX of the ESP8266, RX of the device to TX of the ESP8266. ...
1
vote
1answer
51 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
77 views

How arduino boards eliminate the need to press buttons to flash?

I've come across many Arduino shields for various boards like the Uno, ESP8266, and ESP32 which sometimes have a button for flashing and other times they do not because the flashing is automatic. ...
1
vote
3answers
228 views

How to print 'µ' in the serial monitor?

I have been trying to print the letter µ on the Serial Monitor of Arduino IDE but I failed to do so. Is there any way to print µ or any other Non ASCII characters such as Ó,ß,Ô,Ò,õ,Õ,þ, etc using ...
-2
votes
1answer
36 views

Why do COM port numbers between Arduino and Processing not match? [closed]

I have a Processing program that reads data sent to the serial port by an Arduino. When I go to device manager it shows that the Arduino is plugged into COM 4, however in order to get Processing to ...
0
votes
1answer
75 views

Arduino Mega upload issue

I have made my own version of an Arduino Mega and I am encountering some issues. Whenever I try to upload any sketch to the Mega, I get the following error message: avrdude: stk500v2 ReceiveMessage():...