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
32 views

Ethernet Shield - Not Working Properly Always

I'm working on a school project and using Arduino Uno. The basic working method for the project is as follows: Read temperature from LM-35. Read CO2 level in air using MH-Z14A. Upload data to server ...
0
votes
2answers
42 views

Can Serial be safely used in an SPI interrupt routine

I have anecdotal experience that using Serial.print inside a slave's SPI interrupt routine (ISR) causes issues with transmission. It also seems that interrupts may be called more than once before the ...
0
votes
1answer
30 views

C: No communication to a connected serial port?

I'm trying to connect to an arduino Mega At2560 unit connected via usb serial port in my linux based PC. Using C code, I'm trying to send and receive simple text strings, just I'm able to send and ...
0
votes
1answer
17 views

Display Wireless Temperature Sensor data to Web page by using Serial communication

I am reading from wireless temperature sensor with help of gateway receiver connected to Arduino UNO, using this code I need to display the data of the wireless sensor on the webpage. Any ...
0
votes
4answers
72 views

How to convert read characters to strings?

How can I append a string e.g. "AA 00 01 00 FF FF A2" to serial data using Arduino? The following code does not seem to be correct: String comdata; void loop() { while (Serial2.available() > 0)...
0
votes
0answers
14 views

Serial communication with a module [closed]

I want to send this command (B0 C0 A8 01 01 00 1A) to another module (via serial communication , ttl interface.), how can I send it and how i can see the replay?
0
votes
0answers
9 views

Arduino as Modbus RS485 slave using only 2 Digital pins

I want to use RX(0) and TX(1) Pins to make Arduino as an RS485 slave. To do this I am using MAX485 IC (Breakout board) https://datasheets.maximintegrated.com/en/ds/MAX1487-MAX491.pdf The problem here ...
0
votes
1answer
45 views

Did not find fingerprint sensor :( Arduino Mega 2560 Adafruit Fingerprint Sensor

I'm getting the following error when I try to enroll fingerprints using the Arduino Mega 2560 microcontroller along with a Fingerprint Scanner: Did not find fingerprint sensor :( The exact devices ...
0
votes
0answers
45 views

Serial.read() keeps returning the same value over and over

This code keeps on returning 'S' with the Serial.read(). #include <Servo.h> #define trig 10 #define echo 9 int pinMotorRN=3; int pinMotorRP=4; int pinMotorLN=5; int pinMotorLP=6; long distance; ...
0
votes
1answer
22 views

Serial.write printing blank values

I've got an Adafruit Bluefruit NRF52 hooked up to the Adafruit BNO055 9-axis orientation sensor, but when I use Serial.write to send the data, serial monitor displays blank values only. The scroll bar ...
0
votes
1answer
32 views

Question on how “f” value is calculated in converting Morse Code to laser audio from this tutorial

I am working on this tutorial, https://www.hackster.io/SURYATEJA/morse-code-communication-using-laser-module-both-ea1b01 and the author created a "Send" and "Receive" code for encoding and decoding ...
1
vote
2answers
31 views

Command through Serial monitor does not properly work in Arduino

I am executing a function in Arduino by giving String input to the serial monitor. The issue here is when i enter "SHOW$" (without quotes) the function showData() works but when i enter the same "...
0
votes
1answer
41 views

Voltage meter ADC + serial: Bytes lost during communication

I want to make a simple digital voltage monitor. So I have a sketch: void setup() { Serial.begin(115200); } void loop() { int val = analogRead(A4); // read the input pin val = 1; byte ...
-2
votes
1answer
59 views

How to communicate between Arduino and another Arduino [closed]

I would like to establish a serial communication between two Arduino and I wrote the following test code. Receiver Arduino sketch: void setup() { Serial.begin(4800,SERIAL_8E1); } void loop() { ...
0
votes
0answers
20 views

Making a ATMega328P-PU and computer communicate but not by standard serial communication

So i have been trying to make a ATMega328P-PU using the Arduino bootloader and a computer communicate the same way brands like Logitech and Razer makes their mouse's and keyboard's communicate with ...
0
votes
0answers
25 views

Have terminal bash script act as virtual “button” for Leonardo?

I've searched quite a lot for this and tried to piece bits of code together but with no luck so far. All i'm looking to do is have a command I can run in terminal/bash script on the Mac trigger some ...
0
votes
0answers
26 views

What would cause one Arduino to be recognized but not another?

I have two Arduinos, A cheap china-knockoff and an original one. I have had no problem with either of them before. But when I moved from connecting the original with a USB A-hub to running it over USB-...
1
vote
1answer
45 views

Why my serial message won't show on another when I try use 2 Arduino communication

I am trying to make a simple chatting program with my 2 arduino uno and 2 PC. But when I tried write a message using PC1 serial monitor the message won't show up on PC2 serial monitor. I can't see the ...
0
votes
0answers
17 views

Checking/accessing Serial prevents clean upload of sketch via bluetooth?

I'm deploying some DIY home automation devices, built around a 3.3v pro mini, a HC-10 module, and a relay board. The arduino is able to be programmed over the bluetooth module, so once it's in the ...
0
votes
1answer
39 views

CPU information on Arduino Serial Monitor

how to show the CPU temperature, CPU usage (percentage) and the memory usage(percentage) in Arduino Serial Monitor.
1
vote
1answer
70 views

Why can't I print boolean variable values (0 and 1) through println function?

source code : int buttonPin = 8; boolean buttonState = 0; void setup() { Serial.begin(9600); pinMode (buttonPin, INPUT); } void loop() { buttonState = digitalRead(buttonPin); Serial....
0
votes
1answer
21 views

How to send characters to Arduino serial using Linux command line without tail -f?

I want to send characters to Arduino serial port which makes the Arduino turn on/off an LED. Here is the code: int led_main=8; void setup() { pinMode(led_main, OUTPUT); Serial.begin(9600); ...
0
votes
2answers
48 views

String compare when using Serial

I try to detect commands given by user in Serial Monitor, but strcmp fails to flag as identical. What do I do wrong ? Is there a better way not reading as String and convert to char for comparison ? ...
0
votes
0answers
33 views

sending data with rs485

I need to read acceleration data with ADXL335 using ARDUINO MICRO (or NANO) and send this data with RS485 module to another RS485 module connected to an ARDUINO UNO (300m between RS485 modules). ...
0
votes
1answer
38 views

avrdude: stk500_recv(): programmer is not responding: lilypad arduino

i realise this is probably the most common error that is asked about on this forum, but it is a major issue for me. i have an arduino lilypad main board (with the ATMega328P, boot loader already ...
0
votes
2answers
37 views

How to assign two or more variables incoming from app [closed]

I'm really new to Arduino and have some doubts about how Arduino reads data. Lets suppose I have 3 variables a,b,c. I need these variables in my Arduino to make whatever. Since all variables are read ...
0
votes
2answers
45 views

Sending file from PC to Arduino

How can i send a (file) from PC to Arduino Yun at running time ? There's a way to send some commands via Serial. But how would a whole file goes ? Assuming the file can take place at RAM without any ...
-1
votes
1answer
32 views

How can I distinguish values sent from Arduino [closed]

Having in my visual basic app something like: private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e) { *whatever* value = serialPort1.Read*whatever*(); } ...
0
votes
1answer
43 views

Can't replace SoftwareSerial by Serial1 on Mega board

This sketch runs well with SoftwareSerial define and the monitor displays device modbus values. But now, i want to replace SoftwareSerial by Serial1 and i have no data. This is the sketch with ...
0
votes
1answer
34 views

MPU6050 Calibration [closed]

Why does the MPU6050 IMU sensor not require calibration? I've used other gyro sensors on RC helicopters that required calibration at boot. Also, how does it know what its neutral position is ...
0
votes
2answers
59 views

What could cause data to be printed correctly, then incorrectly and then repeated? CAN bus / general transmission

I am attempting to send data from an MPU6050 connected to an arduino uno to another uno via CAN bus, however i don't think this is a CAN bus specific issue. In short, i am sending two packets of 8 ...
0
votes
1answer
31 views

Debug-logging without using Serial.print and without WiFi

In order to transmit text from the Arduino board to the HC-05 Bluetooth module, I have use Serial.print. However, I don't see a way to debug the code without using Serial.print to test the other ...
-1
votes
1answer
24 views

Can I operate an arduino that has a file uploaded on it, without having the file myself?

I've been a massive idiot and accidentally deleted the sketch I need for a project at university, and I didn't create any backups. The sketch is already uploaded into the arduino, which operates using ...
0
votes
1answer
32 views

Optocoupler on Tinkercad acting weird

So, maybe it's my understanding that is at fault or maybe it's tinkercad. It's probably the former. But anyway here's my problem I've connected it according to picture https://imgur.com/a/h2HYgUE ...
0
votes
1answer
42 views

Receiving junk values in Arduino serial monitor console

I want to send a character from a Zigbee transmitter to an Arduino Mega 2560. After the character is received, Arduino should send some data back to Zigbee. But Arduino is always receiving junk values ...
0
votes
1answer
46 views

Random characters generated by LCD during serial.read()

I am using the following codes to print characters on LCD display.... #include <LiquidCrystal.h> const int rs = 8, en = 9, d0 = 4, d1 = 5, d2 = 6, d3 = 7; LiquidCrystal lcd(rs, en, d0, d1, d2, ...
0
votes
2answers
66 views

Serial Communication between 2 Arduinos for analogRead value

I have an optical sensor connected to A0 on Arduino #1 (Nano) giving me values from 200 to 1010. I need to receive these values in Arduino #2 (Nano) through serial communication. I have used a simple ...
-1
votes
1answer
22 views

Is it possible to simultaneously acquire 2 values from the Arduino? [duplicate]

I am currently making a project using a resistive touch screen and an Arduino Uno. The resistive touch screen outputs an X and Y coordinate pair, which I then want to be able to read and output on an ...
0
votes
1answer
62 views

Multiple sensors connected to Arduino MEGA 2560 Serial ports

I am using Arduino MEGA 2560 to read values from two sensors. Sensor 1 is providing us two values separated by a comma and a space followed by a newline character. e.g.: 2.277, 7.942 2.269, 7.897 2....
0
votes
1answer
38 views

Arduino losing connection to Serial port after running function

For some reason when I loop my code through a separate function the serial port hangs up. The serial connection appears fine when I call cases within the loop but not when I call outside. I tried to ...
1
vote
1answer
185 views

getting error 'Serial' was not declared in this scope

I am adding Dust Sensor to my particle photon project at home, I got this GitHub project that I want to test before implementing a final code. I am not an expert in cpp, I wanted to modularise the ...
0
votes
1answer
38 views

Why my light meter's values are blank on Arduino Serial Monitor?

I tried to represent the values of TSL 2591 Adafruit light sensor on my Arduino Serial Monitor, but for some reason, I could not do that. The Arduino Serial Monitor just enters some blank values and ...
0
votes
2answers
68 views

Problem with modbus communication between two arduinos when writing more than 27 registers

I have the following problem: I want send 200 registers from a modbus master to a slave. Both are arduinos. I can't send more than 27 registers. When I send more i get the Errorcode 255 which means ...
0
votes
2answers
51 views

Serial.write is synchronous

I have a good experience of the real(/critical)time world, but I'm new with Arduino. I noticed that Serial.write is synchronous. If the buffer size is >64 (the USART size) it lasts the time of the ...
0
votes
5answers
75 views

Can I have two separated serial monitor for the same arduino board connected to PC?

I'd like to split serial communication into the two channels: 1) debug info, 2) application data. There's only one Serial object to use. However, maybe, there is an alternative way to print data ...
0
votes
2answers
23 views

What is the best serial communication method between an Arduino and a spectral sensor?

I have an Adafruit AS7262 visible spectral sensor. I want to receive the data of the sensor with an Arduino. The sensor has two serial communication options: UART(asynchronous) or I2C(synchronous). I ...
0
votes
1answer
55 views

Does SoftwareSerial and the servo library produce interrupt conflicts?

I'm planning a project that will involve multiple serial ports and the Arduino servo library. I have heard that this may cause interrupt conflicts. Are there any simple solutions to this
0
votes
1answer
55 views

How to send an integer through pyserial with Python to an Arduino and get back the same result?

There has been similar questions all over the internet but none of them seem to answer my question, so can anybody tell me what is wrong with this code and how I can fix it? Python code: import ...
0
votes
1answer
46 views

Serial monitor doesn't work with piezo buzzer

So I can't see the distance of the proximity sensor anymore as soon as I type the code for the piezo buzzer. I've tried many things but it doesn't work.. Can anybody help me fixing this? int trigPin =...
0
votes
1answer
76 views

elechouse Voice recognition v3 module not responding when i send command using Access port serial tool

I have this challenge of receiving data when I send a command to voice recognition v3 module. the uart connections are okay, but when I send a command I don't receive a response on the terminal. the ...