Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
2
votes
0answers
36 views

How can I make std::cout write to Serial?

I'm using an Arduino MKR WiFi 1010, a SAMD ARM Cortex M3 board. I rely on the standard library a lot, using things like std::vector<> and std::string. I also want to use std::cout. I've managed ...
0
votes
0answers
21 views

Menu on Serial Monitor

I'm trying to make a menu through serial monitor, but it always on a infinite loop... My question is where i call this function? On Setup or on Loop? The menu: int controle_opera = 0; void menu(...
0
votes
0answers
15 views

What is the best way to connect arduino uno with matlab ?? For my project

I conect MPU6050 sensor with arduino uno and read data 1-temperature 2-accelerometer 3-gyroscope on arduino And i wont to send this data to matlab to draw it What is the best way can i do that
1
vote
2answers
32 views

Matching baud rate on serial monitor

I am using different codes which set different values of baud rate through the Serial.begin() function. Do I need to change the baud rate of the serial monitor to match the initialized value on the ...
0
votes
0answers
21 views

Serial communication from Arduino to ESP8266 NodeMCU works, but from NodeMCU to Arduino isn't working

My circuit connection is like: (I am following this tutorial) Code uploaded to Arduino: #include <SoftwareSerial.h> #include <ArduinoJson.h> SoftwareSerial s(5,6); void setup() { s....
0
votes
0answers
17 views

Characters like '$' coming through weirdly (as in '$$amd4') when sent from ESP8266 to Uno via Serial

I am running a program on an Uno using data that an ESP8266 is sending via Serial (can't run directly on the ESP8266 due to not enough GPIOs) and I'm having a problem where characters like '$' on a ...
0
votes
0answers
6 views

Serial data does not appear in monitor when 2 readers are connected

I am using an arduino mega 2560. I have 2 RFID readers connect to 2 different serial ports. during my prototyping phase, everything was fine, my 2 readers worked together perfectly. I am now moving ...
0
votes
0answers
16 views

Send information from computer to Arduino via USB (basic clock)

I've created a small project using an Uno. I usually mess around with ESP8266 chips, because they have WiFi and are relatively easy to work with. However, this time I've decided to go right back to ...
0
votes
2answers
32 views

facing issue with while loop

I'm trying to develop one code in which I'm facing issue with while loop. Once I enter any newString it enter in while loop it count till 10 times, when (n>10) then it is coming out from the while ...
0
votes
0answers
16 views

Arduino Nano 33 IOT - Bluetooth Classic (Serial)

I've an arduino nano 33 iot and I'm working with the first time with bluetooth. So far BLE is working fine, I can use an app on my smartphone to check the services and characteristics. Is it possible ...
0
votes
2answers
34 views

Serial Commmunication between two arduino

I want to send the voltage magnitude received on an analog pin of atmega328Pu to another arduino uno using Serial communication pins TX and RX and display the value on the receiver arduino's Serial ...
0
votes
0answers
45 views

Monitor serial0 while code is being uploaded

I'm trying to upload the sketch on a Mega 2560 via the serial port 0 using another microcontroller. To better undestand the process, I decided to first observe what avrdude is doing while it is ...
0
votes
1answer
23 views

Serial monitor when port is being used by another application

I am controlling some LEDs via the USB serial port using a Tkinter/Python3x script to debug what I suspect is a hardware problem. from tkinter import * import serial usbport = 'COM3' ser = serial....
0
votes
0answers
26 views

Arduino and Processing- Conditionals only executing sometimes in response to IR codes

I am reasonably new to arduino and even newer to Processing so still struggle with trouble shooting my code. The intention of my sketch is have Processing receive IR codes from the arduino and ...
0
votes
2answers
55 views

UART communication - Serial is always empty

I have a payment terminal which uses UART (or simply speaking Rx, Tx, Gnd pins) and I have an Android tablet app which is connected to the terminal using USB to DB9 adapter based on PL2303 chip. The ...
0
votes
0answers
14 views

HM-10 doesn't respond to Arduino

I'm using Arduino Nano R3(old bootloader) and Serial(hardware serial). Arduino -> HM-10 5V -> 5V GND -> GND RX -> TX TX -> RX with (1k/2k voltage divider) Code is below #include <Arduino.h&...
1
vote
1answer
70 views

I want to print onto serial monitor when it's detected the value change

This code is measuring distance from object by using the Ultrasonic Sensor and print onto serial monitor. However, serial monitor constantly output values. I want to print only one time if detected ...
0
votes
1answer
20 views

Arduino accepting only alternate characters

I am writing an Arduino code to receive SMS from a SIM800 module and then send the same message back to the sender. My code is as follows: #include<SoftwareSerial.h> SoftwareSerial mySerial(9, ...
0
votes
0answers
44 views

Serial data printing slowly

I have connected an arduino serial port to my PC and monitoring the output in realterm. I am trying to print: CR 11.98,123,3520,01CRLF But it is resulting with some delay. First CR 1 Is printed. ...
0
votes
1answer
51 views

EEPROM Capability [closed]

I'm new to this platform and actually this is my first question on here.So I can read and write any figures in Arduino EEPROM apparently and it works as expected. Is it possible to do a comparison to ...
1
vote
1answer
74 views

HLW8032 UART sends random data ( Registers Overflow often)

I designed my own version of smart socket just like the Sonoff with power metering chip HLW8032. And when I read the data in ESP-12F the data doesn't have a fixed format. To troubleshoot the issue, I ...
0
votes
1answer
15 views

Timer 1 Arduino - Create 2 Timers

I’m trying to output 2 separate frequencies using 2 output pins from an Arduino using the Timer 1 library. A snippet of the code is show below. void setup() { Serial.begin(9600); pinMode(button,...
1
vote
2answers
66 views

Number of digits setting for serial printing the sensor output value

I am getting fan motor rpm as 3200. But if I get the data as 50, I should get the value like 0050. How can I do this? I can do it like checking the value for single digit(0-9), double digit (10-99), ...
0
votes
2answers
36 views

Serial.availableForWrite versus Serial.flush

Is there a difference between the following two line codes? while (Serial.availableForWrite <= 0) {} versus Serial.flush() Thanks!
0
votes
1answer
60 views

Serial Module Echoing a `0x00`

I am having a problem with a MAXIM Serial module (Config A) with a simple repeating code from COM port. When sending a character (k:0x6b) I receive a (0x00) echo. Without the module and just ...
0
votes
1answer
37 views

Missing bytes sended through serial from C# app

I am trying to store values sended by C# app in EEPROM via Arduino UNO. Here is a C# code that reads bytes from file (I'm 100% sure that there are, and always will be 256 bytes) and sends the buffer ...
1
vote
1answer
36 views

How can I use a variable to choose which Serial port to interact with?

In my use case I have multiple devices connected to the serial ports of an arduino. Currently I write to them using Serial1.write(), Serial2.write(), etc. How can I choose the port programmatically, ...
0
votes
2answers
36 views

Reset arduino nano after disabling tx/rx

I know, i am a bit dummy sometimes and i don't know why i actually did this but here it is. I have an arduino nano and i want it to use an external power via the the Vin port using a 12V external ...
0
votes
1answer
89 views

2 buttons pressed at the same time elevator logic

I have currently created a working elevator code where the elevator goes up when pressed a button, and stops at a floor when the sensor senses that it has reached the floor. This is how it works: #...
0
votes
0answers
47 views

Serial Communication with a Serial device

I have a blood glucose meter which supports downloading data to computer using a serial cable and its own software. I made a serial cable for this with a usb to ttl pl2303 and its working. I can ...
-1
votes
1answer
29 views

arduino mega multi integer values reading on other arduino mega

I need two Arduino communications. The master arduino from the slave arduino needs to read 16 signals. The sample serial port output from the slave is as follows. @ 125 @ 13 @ 874 @ 1023 & 950 @...
0
votes
1answer
49 views

Sending Integer > 1 Byte from Android to Arduino over Serial

I´m using public abstract void write(int b) throws IOException; from class OutputStream on Android Studio to sent Integer (degrees from 0 to 360) to the Serial Port of my Arduino over HC06 ...
-1
votes
1answer
51 views

Trouble in sensor data reading sequence

I am reading from two MPU6050 sensors using Arduino Uno but it give trouble in squence. The code is perfect and also sensors reading is done. See image of serial monitor. You can see the above ...
0
votes
0answers
28 views

Issues controlling servo motors with serial monitor while using 16 channel servo Shield

I am making a 6-axis robotic arm that uses multiple servo motors.The goal is to create a program that accepts degree values from the serial monitor to control multiple servo motors. I have just ...
0
votes
1answer
29 views

Why is Serial Print causing different behaviour based on where its located

Im trying to test out these two motors I have where I need to call a function from the loop. I only want to call this function once so I made a quick little if statement to have the program only run ...
0
votes
1answer
42 views

Nothing gets sent to Arduino from Processing

I have a problem where I kwow that my bluetooth module (HC-05) is connected to a processing sketch, but nothing ever gets sent from the processing sketch,why? No error messages but the info never ...
0
votes
0answers
25 views

Instead of a float, a displayed is question in sprintf [duplicate]

I need to collect a message like: "Temperature: 15.8" to send to UART. For this, I want to use sprintf. I know that this is not supported, but people solved a similar problem by converting the float ...
0
votes
3answers
38 views

Arduino Mega's auxiliary serial ports

If I am correct, the first two pins (RX/TX) are connected to the USB, and I cannot use the serial monitor and the first RX/TX serial ports at the same time. But, what about the other 3 auxiliary ...
0
votes
0answers
22 views

Arduino Nano and neoSWserial library

So I've been playing with neoSWserial library on Arduino Nano. I've been using the example interrupt code: #include <NeoSWSerial.h> NeoSWSerial ss( 4, 3 ); volatile uint32_t newlines = 0UL; ...
0
votes
2answers
51 views

How to program micro chips directly with USB

Is it possible to program chips like the Arduino uno's Atmega328P directly with USB serial from your computer? Where can i find information on the protocols/standards to do such a thing? More ...
0
votes
0answers
18 views

How can I make Arduino communication as fast as possible with minimal (if any) error?

I'm building an inverted pendulum. I have two rotary encoders and a 12V DC motor. Right now when I try to run the DC motor and change one of the rotary encoders, the rotary encoder will not print to ...
2
votes
1answer
207 views

Why Won't my Serial Read value stay the same

I am trying to write to serial to control the brightness of an LED. When I initially type in a value such as '50' or '100', the LED lights up, but then the 'ppm' value drops down to '10' and just ...
0
votes
0answers
31 views

How to fetch a character in a specific position from serial buffer?

All what i mean is how to get the character in a given position in Serial buffer, if you want more details here is what i need : First of all I am using an Esp8266-01 (Wifi Chip) generic board with ...
0
votes
1answer
29 views

why data value is 0

i want to apply formula. but getting 0 at output. #include "HX711.h" int data; HX711 scale(A1, A0); // parameter "gain" is ommited; the default value 128 is used by ...
0
votes
0answers
23 views

How do I get my servo to turn using bluetooth, is this a glitch?

I'm very new to coding with arduino so please excuse my naivety, For an electronics assignment I am making a servo turn back and forth using a HM10 BLE however each time I press a button that sends '0'...
0
votes
1answer
33 views

Measure revolutions per second with reed switch

I'm trying to measure speed of a fly wheel with a reed switch with one magnet (1 pulse per full rotation). I have an 100nf cap connected to switch to help with debounce. #include <Arduino.h> ...
0
votes
0answers
38 views

Send HTTP request from Arduino UNO+ESP8266

I am trying to send an HTTP request from from an Arduino UNO through an ESP-01 connected by Serial. Communication with the ESP and connection to the AP work fine. But when i try to send an HTTP ...
0
votes
0answers
15 views

SIM80L EVB not working

I have a problem with my SIM800L Module. I use the Code from https://www.ayomaonline.com/programming/quickstart-sim800-sim800l-with-arduino/ I want it to send an SMS to my phone, but it doesn't do ...
0
votes
1answer
27 views

Monitoring Power Down Using Arduino UNO and ZMPT101B

I am in the process of implementing power down alerting system suing Arduino UNO and ZMPT101B Single phase relay. My code as follows, #include <Filters.h> //Easy library to do the calculations ...
0
votes
1answer
39 views

Serial connection two devices two power supplies

I'm trying to connect an ESP32-CAM to a 3d printer using a serial connection. When powering the ESP from the 5V rail on the 3D printer(and using 3.3V zener diodes between tx, rx & gnd), everything ...