Questions tagged [serial-data]
Sending one data bit in a time. Used mostly in RS232 context.
135 questions
-1
votes
1
answer
46
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 ...
1
vote
1
answer
124
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 ...
0
votes
2
answers
853
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 ...
-1
votes
1
answer
81
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 ...
1
vote
1
answer
524
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 ...
-3
votes
1
answer
182
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 ...
1
vote
1
answer
181
views
Inconsistent results when reading input looking for spike patterns
I'm writing a library that will interface with a control unit on a refrigerator compressor pump (QDZH35G). One of the features of the control unit is that it can detect what problems it's encountering ...
3
votes
1
answer
530
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 ...
1
vote
0
answers
128
views
Serial does not receive all chars
I'm trying to follow Serial Input Basics to build a program which receives commands over serial like "<led:12,34,21>" but i'm stuck on receiving the characters from serial...
I have ...
1
vote
1
answer
503
views
Will an Arduino Nano work instead of Teensy 3.2?
I hope this is ok to post here and I appreciate any suggestions or help and opinions/facts to make this work.
First off I’ve Never programmed an Arduino device!
I was looking at this project:
https://...
1
vote
1
answer
1k
views
What is the best (fastest and most robust) way to send messages back and forth between Python on a PC and an Arduino, over serial?
I am trying to communicate between a PC running Python using PySerial and an Arduino. The Arduino itself has a CAN shield, and is responsible for interfacing with a motor. My goal is for the PC to ...
1
vote
0
answers
1k
views
ESP32 print weird data on Arduino IDE Serial Monitor
I tried to upload a sketch on esp32 devkit v1 (wroom) picture of my board is below :
but this message is always printed on the serial monitor continuously and quickly :
rst:0x3 (SW_RESET),boot:0x13 (...
1
vote
0
answers
45
views
How to splitting values in int serial read values [duplicate]
I get values in serial read using the following code,
int32_t bytesSent = 0;
if (mySerial.available()) {
bytesSent = mySerial.read();
}
Output:
Serial.write(bytesSent); gives -1199/1211 value.
I ...
1
vote
1
answer
237
views
memory leak w/ no Strings involved
I'm trying to read data being transferred via Infrared from my Smartmeter on my ESP8266 using the following sketch:
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <...
0
votes
2
answers
856
views
String() vs char for simple flow control
I am newbie in Arduino and writing a program where I want to control the flow by using Serial monitor input (PI controller).
I've read that using String() although easier it is slower than using char. ...
1
vote
2
answers
383
views
Novice learning Serial.readString()
New to Arduino, getting into String variables and reading them from serial monitor.
Basically what I'm trying to do is have the user input either red, green, yellow. Whichever String they enter the ...
1
vote
1
answer
80
views
Noise in RF 434 transmitter and receiver
I'm working on RF transmitter and receiver modules using two Arduino UNOs. I'm getting an additional noise on the receiver side in serial.println.
To be more clear about the question. Hre is my ...
1
vote
0
answers
264
views
Can read Serial but cannot write - serial communication Arduino Mega 2560 clone
I am having issues using the following USB to UART module. I am using an Arduino 2560 clone.
I have two connections with the Arduino:
COM7 which consists of the given module, connected to the main ...
-2
votes
1
answer
435
views
My Atlas Scientific sensors measurement give zero values at first reading
I am still continuing my hydroponic nutrient monitoring project. In short, I made a hydroponic nutrient monitoring system with I2C connection, and decided to do serial communication with Raspberry Pi ...
1
vote
1
answer
9k
views
Conversion from ASCII uint8_t to string
I am sending a string from a Raspberry Pi to an ESP32 via BT. I am getting one ASCII value per line. How to convert it into one whole String? I tried as follows, but I get an error while running the ...
-1
votes
2
answers
103
views
reading strings from multiple Arduinos
So I have 5 Nanos all trying to crack a password, the idea is each one has one fifth of the list so they can test 5 at a time, then when it is found, I want it to be displayed on a screen I have, the ...
0
votes
1
answer
207
views
When using the IRremote library- why does it say 64 bits when after converting the hex to binary it comes out to be less?
I get this code output on my Serial when the IR receiver gets a signal:
Protocol : GREE
Code : 0x01C02350000000E0 (64 Bits)
Mesg Desc.: Model: 1 (YAW1F), Power: Off, Mode: 1 (Cool), Temp: 16C, ...
1
vote
2
answers
857
views
Serial connection between Processing and Arduino doesn't work
I'm trying to connect an Arduino Nano Every and Processing via serial. I'm getting no errors on either side, and the arduino serial functionality works otherwise on the arduino IDE.
I'm connecting on ...
1
vote
1
answer
113
views
Issue with input from weighing scale controlling a stepper motor based valve
Hello and thanks for any help in advanced.
What changes do I need to make to my code to get rid of the issue of the valve opening up again at end of cycle in "Auto" function.
Hardware:
...
1
vote
0
answers
171
views
Arduino Visible Light Communication(Audio transmission)
I think this is a broad question. I'm currently implementing visible light communication with Arduino. I'm using a laser as my transmitter and LDR as my receiver. I'm able to transmit a text from one ...
1
vote
1
answer
1k
views
How to send multiple data over serial in one byte?
I'm currently reading 3 limit switches and sending those data over Serial.write using the following code.
#include <SPI.h>
#include <Wire.h>
#include <arduino-timer.h>
//Define ...
0
votes
0
answers
57
views
I'm looking for the StreamSend.h library for use in Arduino/ESP8266 serial communications using struct [duplicate]
I've come across an interesting yet old article within StackExchange which has great examples of sending structured variables over serial communications. The library StreamSend.h and it's source code ...
1
vote
2
answers
891
views
which is the best way to declare Serial while creating Arduino library?
Well, I am trying make a library for HMI display. display and Arduino comminicate with Serial. So I will so many times Serial port. Generally I will use Serial.write commend. if I examine other ...
1
vote
1
answer
614
views
How to send data from one Arduino to another isolated?
I have no experience about serial communications, with that being said; I have two circuits isolated from each other and each have a ATMEGA8 reading a voltage on their ADC.
I want one of them to send ...
1
vote
1
answer
399
views
Find OK or ERROR in serial string
I am trying to figure out how to capture the OK or the ERROR from a SIM800l.
I have tried
mySerial.println("AT");
while (mySerial.available() > 0 ) {
String str = mySerial.readString();
...
2
votes
1
answer
2k
views
Read serial with header and end marker
I am trying to use Topway display for HMI lcd with Arduino. This display using RS232C protocol at docs it has a "Communication Packet Structure" like this.
So my query should start with AA ...
1
vote
1
answer
414
views
Can’t send string from arduino to processing via hc05
I’m trying to send and receive data from my laptop to arduino nano via hc05 Bluetooth for a rocket flight computer. For some reasons which I don’t know, I can send data from processing software using ...
1
vote
0
answers
114
views
Serial communication problems
When I run this script serial communication just stops after a random period of time. There is no error it just stops outputting data and does not respond to inputs in IDE. Does anyone know a fix for ...
1
vote
0
answers
376
views
Send Multiple Sensors Data into single Packet in Arduino
I have two sensors data in packet but now I want to send these two sensors data into single packet in which these two sensors data are gathered. I mean I want to have a packet in which I have oxygen, ...
1
vote
1
answer
540
views
Send packet of multiple sensors data to Bluetooth module
In my project I am using 3 sensors. I am sending a regular stream of sensors data to Bluetooth module but now I want to send data in form of packet (which may be 30 bytes or 40 bytes of size) in ...
2
votes
0
answers
150
views
Unknown text printing on Serial Monitor [closed]
I want to use the Serial Monitor for some debugging, but it prints something else.
Edit-
This only happens if I use the attachInterrupt() function
I tried another program that does not use interrupts ...
1
vote
1
answer
3k
views
Arduino Serial.readString() trouble
Hello everyone I write my code and have some troubles.
When I write on in my serial monitor my buzzer condition wasn't changed.
Can you help me realize the reason. I wrote code with int type and it ...
1
vote
2
answers
288
views
Purpose of LED indicator
I am using an arduino mega clone called the Funduino.
I am developing a python based, tkinter application that will receive the serial data that arduino sends.
However, i am witnessing some behavior ...
1
vote
0
answers
85
views
processing data received via serial
Hey i'm trying to make an Arduino that can log key presses from a keypad and save that as a variable. When it receives information from another arduino via serial I want it to create a variable from ...
1
vote
0
answers
85
views
Directly synthesising an OOK modulated LF signal using a CSV file
I'm looking to transmit some data (CSV files) from a measurement instrument underground to a receiver on the surface. I've learned that in order to penetrate the limestone, low frequencies have to be ...
-1
votes
1
answer
2k
views
Send data from one NodeMCU to another NodeMCU using Serial Communication
i am using NodeMCU (ESP8266) to communicate with another NodeMCU (ESP8266) using Serial Communication. Because i am using ESP-NOW to communicate and ESP-NOW and WiFi can not work together very well so ...
0
votes
1
answer
477
views
Controlling LEDs with bit bang method
I'm doing a research for RGB LED chips that MCU can control with one pin. I found this LED chip and it seems controlling LEDs is not as I've tought. I understand hardware part, software side is a ...
0
votes
1
answer
2k
views
Not able to upload code to NodeMCU
Im now working on a Node MCU based project but the problem is that i cannot upload the code to the board. Further more whenever i connect the usb to the NodeMCU my keyboard stops working and only ...
1
vote
0
answers
77
views
Arduino Serial Communication possible with IDE 1.8.5 but not with IDE 1.8.13
I have the following problem: I am working with an Arduino Nano 33 IoT and a second serial interface via sercom0. The code is just taken from this tutorial:
http://www.getmicros.net/serial-...
2
votes
1
answer
197
views
Laser tripwire and LDR
I am planning to make a laser tripwire but I have an issue. Let me explain what I am trying to do:
Making a laser tripwire is actually pretty easy at its core. You just need an LDR and a laser diode. ...
1
vote
2
answers
11k
views
Read Comma Separated String
I have a string that looks like this "10.00,20.00,-50.00," in which these are angle values and they have 2 decimals and can be negative. I want to separate them into 3 separate floats. Here ...
-1
votes
1
answer
265
views
storing 600 unsigned int values in an array and find minimum and maximum values
I am reading an ASCII serial data values from a sensor and storing it in an unsigned integer variable. The values are ~45000 to 50000 range. I need to store 600 values and then find the minimum and ...
1
vote
0
answers
58
views
serially parse integer after serially read
I want to write below code but I don't know where I doing wrong, so please help me solve this issue.
Serially read some text like number then I want to serially parse integer value into some variable ...
1
vote
0
answers
53
views
Arduino wait for incomming data from blynk terminal [duplicate]
I need to add wait command in code where it waits the next input value from blynk terminal to arduino? How can I do that? please help, I will appreciate your help, Thank you.
Here is my code
...
0
votes
1
answer
496
views
Serial Communication, if statement not working
#include <SoftwareSerial.h>
SoftwareSerial my (D6,D7); //(Rx,Tx)
String msg;
void setup() {
Serial.begin(115200);
my.begin(9600);
}
void gas()
{
Serial.println(msg);
if (msg == "0&...