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.

6
votes
5answers
65k views

Clear existing array when getting new serial command

I'm starting to build my first Arduino project but I'm running into some problems with serial communication. I get serial data from the console and store it in a char array called "data". Then, when ...
0
votes
0answers
34 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
44 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
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
1answer
46 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
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
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
2answers
637 views

ESP8266-01 wrong flow control settings

Changed ESP8266-01 to wrong settings by mistake. It was working ok at 115200 (its default settings). It was connected like this: PC->(USB)->Arduino->ESP8266. Using Arduino as bridge Pins 0 and 1 (...
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 ...
2
votes
1answer
136 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. ...
15
votes
13answers
51k views

Arduino Nano uploading gives error: avrdude: stk500_recv(): programmer is not responding

I have a Arduino Nano (Sainsmart) that I'm trying to upload a sketch to. Under the Arduino IDE, the device selected was Arduino Nano w/ ATmega328. However uploading the sketch gives me the error ...
2
votes
2answers
3k views

How do I communicate with a sensor via an Arduino's RX/TX ports?

I have a sensor that communicates via serial communication. CTi Sensors TILT-05. It transmits an ASCII string with data separated by commas. I want to be able to read the incoming ASCII data in the ...
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
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 ...
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
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 ...
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 "...
1
vote
2answers
2k views

Serial monitor listing unreadable characters

My Serial Monitor is displaying unreadable characters. If anybody can give me some insight on why this would be happening please let me know. Thank You.
0
votes
1answer
386 views

SIM800L starts sending garbage values to Arduino after random interval

I have a SIM800L module connected to Arduino Mega's Serial3. SIM800L is powered by 4.2V power supply and I have put a voltage divider between Arduino's TX3 and SIM800L's RX so that the voltage in the ...
4
votes
1answer
378 views

RF24Mesh master-base node communication delay

I'm trying to build a mesh network using 4 nRF24L01 modules directly connected with Arduino Uno where 1 module is master node and the rest are base nodes. The workflow is exactly as follows I'm ...
1
vote
1answer
718 views

Arduino Serial Monitor works but not on PySerial and PuTTY

I made simple custom arduino board using an atmega328p and the PL2303 serial to USB chip. In my arduino program, I am in a loop that sends out a string continuously. I can read this in the Arduino ...
0
votes
1answer
496 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
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
1answer
3k views

Mac won't detect Serial Port for Leonardo

EDIT: The problem was the cable I was using (see answer below). I have a MacBook Pro running OS X Yosemite (10.10.1). I connected my Arduino Leonardo to my computer for the first time today (using a ...
1
vote
1answer
386 views

Sending PUBX commands to GPS Board (Ublox NEO-6M) through SoftwareSerial

I am having trouble parsing NMEA sentences coming from a GY-NEO6MV2 board (https://www.cytron.io/p-gps-neo6mv2), using the TinyGPS (https://github.com/mikalhart/TinyGPS) library. The GPS board itself ...
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
6answers
2k views

Problems with serial communication from Arduino to Bluetooth HC-05

I just purchased some HC-05 Bluetooth devices and I have followed the directions to put the devices in AT command mode by holding EN HIGH when the HC-05 powers up. When I do this the HC-05 goes into ...
1
vote
2answers
379 views

Serial monitor in Arduino IDE for RobotDyn ESP8266-Pro via CP2102

I bought a couple of "ESP8266-Pro" micro-controllers from a Chinese company named RobotDyn. There's no real documentation with them, but I've bought a lot of other stuff from them in the past that ...
2
votes
3answers
597 views

Arduino Uno programed from a Nvidia Jetson tx2

I'm trying to program my Arduino Uno with a Jetson tx2 and get the error avrdude: Send: 0 [30] [20] avrdude: ser_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not ...
0
votes
2answers
434 views

Can't get software serial to work

So I have two Arduinos (Arduino Nano) and I'm trying to get them to communicate via SoftwareSerial. I have the 'sending' Arduino's D10 pin connected to the 'recieving' Arduino's D11 pin, and vice ...
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
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 ...
3
votes
2answers
358 views

Serial - Send data to Arduino while Arduino sending data

Arduino send data to PC each iteration. When I'm trying to send data to Arduino while receiving data from it, it takes too long. Serial.available() returns false even I sent data from PC. But if I add ...
2
votes
1answer
1k views

Laser emitter + receiver for Arduino (Arduino to Arduino communication)

I'm working on a project using 2 Arduinos connected to 2 computers to demo Serial to Serial communication. We're using Arduino Uno connected to the computer via Serial and software serial for inter-...
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
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
2answers
658 views

How will Arduino communicate wirelessly through XBee?

I am using one XBee S2 configured as coordinator API attached to my laptop and one XBee S2 attached to an Arduino Uno that is configured as a router AT. I want to generate an alarm on LabVIEW as I ...
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():...
1
vote
1answer
2k views

SerialUSB on Arduino Due

I'm starting fiddling with a Due but I can't seem to be able to communicate over USB with it. Here is my code: int bauds = 9600; void setup() { SerialUSB.begin(bauds); } void loop() { if (...
2
votes
2answers
285 views

CC3000 Wifi: Enable Debug

How do I enable debugging using Adafruit CC3000? I am using the Adafruit_CC3000_Library. I've followed the WebClient.ino example sketch. I'm able to make 300 to 400 HTTP requests, but eventually ...
0
votes
2answers
726 views

How do I stop a servo motor at the current position when using a serial port? I want it to remain in one position when receiving “0”

I am working on a project where I would like values received from an Xbox Kinect will activate components on my Arduino. Currently, I am trying to get a servo motor to turn on and rotate when the ...
2
votes
1answer
3k views

Serial Port greyed out Ubuntu 16.04

I am running Ubuntu Mate 16.04 LTS, with an Arduino Uno R3 clone. I am having the dreaded serial port graying out problem, and have not found a solution for fixing it. Currently, The serial port will ...
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); ...
2
votes
1answer
3k views

Cannot open the serial monitor and get error “Board at COM 3 is unavailable” (3rd party Arduino)

I am using a 3rd party Arduino board made by Stensat (from their experimenters kit). The documentation that comes with it says that in the Arduino environment, the board that should be selected is the ...
0
votes
2answers
466 views

Arduino reads hc-05 device connecting status

Hello I want to get an arduino get status of bluetooth hc 05 if connect with device or not . I'm trying by myself and search on internet website but I can't find useful things.
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
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 ...