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
0answers
14 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 ...
1
vote
2answers
47 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
0answers
15 views

ESP8266-01 w/ Arduino Uno: Failed to connect to Espressif device: Invalid head of packet

I have an Arduino Uno hooked up to an ESP8266-01. I've changed out the wiring multiple times and reassembled them just to make sure that I'm wiring everything the way it should be. I am however unable ...
0
votes
0answers
35 views

Connecting serial ESP8266 ESP-07S - not working

I'm trying to access EPS8266 ESP-07S serial connection on PC using CP2102 and PL2303HX - both supporting 3.3V connection. I'm using diagram like this or this, and trying with and without connected RST,...
0
votes
1answer
31 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 ...
-2
votes
0answers
29 views

Arduino Hello World [duplicate]

So here's my code for the when i enter 3 ready to read bits in the serial monitor it prints a hello world and resets the number of available bytes to 0, i got the, it wont print anything when only one ...
0
votes
1answer
22 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
44 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
29 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
0answers
29 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 (...
-1
votes
0answers
25 views

Serial data receive on matlab from arduino [closed]

i need to receive serial data from arduion to matlab through com port. How should i go ahead. At present i have connected arduino to matlab through serial com port using arduino support package. Now i ...
0
votes
1answer
23 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
37 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
61 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
41 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
0answers
26 views

How to make arduino as a client and send the data collected by the arduino to a web server via ESP8266 [duplicate]

I am working on an IOT project where Arduino as a client and send the data collected by the Arduino using Current Sensor ACS712 to a server which is hosted over the internet. Where I can store and ...
0
votes
1answer
47 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
50 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
140 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
18 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
41 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
55 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
50 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
16 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
31 views

Problem processing serial data

What I'm doing: piano --(usb)--> computer --(usb)--> Arduino UNO --> LED strip Basically, I play a piano and an LED strip illuminates the active notes. Problem: It works fine, until I ...
0
votes
0answers
18 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
0answers
18 views

USB OTG to arduino using another power source [duplicate]

First off: I know some similar questions have been asked, but I think my question has not been answered yet. I am working on a way to controll my LEDs via my Android phone, which works, by connecting ...
0
votes
1answer
25 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
41 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
0answers
26 views

Delay in Serial communication between python and arduino [duplicate]

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 ...
0
votes
1answer
29 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
80 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 ...
0
votes
1answer
46 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
32 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
36 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
45 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
40 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
148 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
62 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
51 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
40 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
25 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
83 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
56 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
25 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
38 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
29 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 ...
1
vote
1answer
80 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. ...
0
votes
0answers
119 views

DFPlayer Mini UART Communication not working

I'm working on a project, which contains a DFPlayer Mini: Reference However, while the I2C modules are working great, i can't get the DF to work (Serial communication). It won't recognized by the ...