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
1answer
620 views

Delete line from text file

In order to make an algorithm work, I'd like to delete the first line of a text file. I'm having a hard time finding an example for that though. I was thinking that there should be the possibility to ...
0
votes
1answer
80 views

Serial Monitor appears unreadable characters

Hello My serial monitor keep showing these unreadable characters. Anyone know what is going on? Many thanks!
0
votes
1answer
108 views

Using TXD1/RXD1 on ATmega1280 for USB communication

I have a few MakerBot Mightyboards running off ATmega1280 chips that can no longer use their standard USB port to connect to a computer (to make a long story short, there's a little inductor that blew ...
0
votes
1answer
597 views

Load Cell and HX711 only outputting 0's

I am using an Arduino Uno and HX711 amplifier to collect data from a load cell. I previously had the load cell calibrated and functioning, but now the load cell will not read any values; only 0's are ...
-1
votes
1answer
571 views

Unable to convert string read from bluetooth to int [closed]

I am using a HC-06 and i want to read a number ending with f as a delimiter, the first three numbers as my servo position, however converting the string into int is giving an endless series of 0s. I ...
0
votes
1answer
251 views

Sending servo position data from one Arduino to another

I'm trying to take the position data generated from this servo sweep, and send over serial to another Arduino. The position data is stored as pos in the code I included, what would be the best method ...
1
vote
2answers
49 views

Upcoming Project [duplicate]

Hey guys I have a project that will require 20 I/O pins with serial communication from a computer to control each of the pins. I would like something as small as possible would a arduino micro or uno ...
1
vote
1answer
64 views

Communicating between two Arduinos wirelessly only works when both are connected to the same computer

The transmitter is an Arduino Mega 2560 (China) that is connected to a computer over Serial, from which it only reads data and sends it using a SYN115 433mhz transmitter. The receiver is an Arduino ...
0
votes
0answers
58 views

Baud rate dependency

I am currently trying to write (obtain) a code for getting raw acceleration values and yaw, pitch and roll angles using these Jeff Rowberg's examples. I have used MPU6050_DMP example to get this code: ...
0
votes
0answers
178 views

Arduino USB Host Shield + USB-Serial Adapter

I have a Neato Robotics XV-11 robotic vacuum cleaner. It has a USB port that, when connected to a computer, shows up as a USB to serial adapter. This is a very simple and easy-to-use command-prompt ...
0
votes
0answers
18 views

Serial communication problem [duplicate]

I wrote the following simple code int sensorValue = 0; void setup() { Serial.begin(9600); } void loop() { sensorValue = analogRead(A0); Serial.print(sensorValue); Serial.print("\n"); ...
0
votes
1answer
58 views

Using digital pins 0/1 on Arduino Due when writing/reading over serialUSB port

I am aware that you cannot use pins 0 and 1 as digital pinouts when communicating over serial via serial.print(), but what if you are using the native port on the due with serialUSB.write()? Thanks
1
vote
1answer
229 views

Does the StringObject.reserve() function prevent memory fragmentation/leaks?

I'm currently writing and testing a professional Arduino application, I'm aware of the dangers of using the String class, so I began to implement C-style strings in some places, but it's just way ...
-2
votes
1answer
84 views

Need assistance with serial data between PC and Arduino Mega 2560

With help from a friend I have written a sketch for my Mega2560 that talks to a PC application via serial at 9600 baud. The PC application send an S which instructs the mega to send variable values ...
0
votes
1answer
243 views

What is wrong with my code? Did you forget '()'?

#include <SimbleeBLE.h> // constants won't change. They're used here to set pin numbers: const int ButtonPlayPause = 15; const int ButtonNext = 12; const int ButtonPrevious = 11; const int ...
0
votes
2answers
87 views

How to continuously monitor range finder and immediately interrupt code to run a different code in pedestrian traffic lights setup?

I am currently doing part 2: Pedestrian Mode of my project below: Regular Mode: This is the regular mode of operation. In this mode the three lights (Red, Yellow and Green LEDs) should operate in the ...
2
votes
1answer
1k views

Send serial data to local server

I am new to arduino coding. I am reading data from serial port and storing it in char array. I want to send that data to the local server but it is not getting converted to string Code : #include &...
0
votes
2answers
245 views

RS422 interfacing with the Arduino

Good day, I have a sensor which supports serial data output using RS422 which has 4 wires (RX+, RX-, TX+, TX-) my question is how can I connect this sensor to the Arduino. I read that i can use 2 ...
0
votes
1answer
74 views

Lag in fetching serial data from Arduino

I am working on a project based on Arduino and python3.6,two HC-SR04 sense the distance of palms and process the data using Arduino and send it through serial port to python3.6 ,python3.6 with the ...
0
votes
1answer
240 views

Trouble uploading sketch / error in sketch

I am following this tutorial of a very basic serial communication between 2 arduino unos. I have made the connections as given and connected the arduino unos to 2 separate laptops via USB. Code1: ...
3
votes
2answers
7k views

'Serial1' was not declared in this scope

Trying to do serial communication between 2 Arduino Unos. Code: #include <SoftwareSerial.h> int ledPin = 13; int board; // 1 = Uno. 2 = Mega. int on_off; // 1 = On. 0 = Off. int buzzerPin =...
0
votes
1answer
618 views

expected primary expression before ')' token

#define ANALOG_IN 0 void setup() { Serial.begin(19200); analogReference(INTERNAL); } void loop() { int val = analogRead(ANALOG_IN); Serial.print(0xff, byte); Serial.print( (val >&...
0
votes
0answers
84 views

Serial Bluetooth Connection Receiving Garbled Data

I'm currently working on project for a custom input device. I'm trying to use a Bluno Beetle to send the input information over Bluetooth Low Energy to another device. Since it's an input device, it ...
-1
votes
1answer
58 views

Can't re-write Arduino Pro Mini

I am just getting started with arduino, but I am having an issue with some 3.3V, 8Mhz Arduino Pro Minis. I am using a SparkFun FT232RL USB to Serial breakout (https://www.sparkfun.com/products/12731) ...
0
votes
0answers
64 views

recursive function doesn't generate correct output inside loop()

I'm new to Arduino and C programming and trying to write a program for playing Paper Soccer game. I have written a recursive function called findPossibleMoves() which generates a String object ...
0
votes
2answers
370 views

How to send float numbers from python3 with struct to arduino

I have searched several questions and through google but could not find a solution. I am simply trying to send a float number from python3 with struct to arduino or if there is any other ways other ...
1
vote
0answers
160 views

Adafruit Huzzah Feather not resetting and serial monitor garbage

Hi there, I have an Adafruit Huzzah Feather project laid out as you can see in the diagram above. Currently I am having trouble getting it to reliably reset and start the sketch. More often than ...
0
votes
2answers
853 views

Array, hexadecimal and serial write

I am trying to write a pice of code which send to a receiver the frequency to listen. As per its documentation, it should receive the following sequence: Example with 123.456 MHz Command to ...
1
vote
2answers
47 views

Extract binary data from text string. Like Perl pack, not just regexp

If I have data coming into an Arduino in an ASCII serial format from some external device (or from a PC, or whatever) and I want to extract binary values from that data and log it or put it on a ...
0
votes
0answers
308 views

Why I don't get the SETUP Command from the MDB Protocol

I hope this is the right place to post this and that I would get some help. I am trying to make the Arduino Mega a peripheral to the MDB protocol. I am trying to use it to emulate a Bill Validator. ...
1
vote
1answer
185 views

When the TX and RX pins for Bluetooth are connected the LCD screen will not update. Why is that?

I have connected a Bluetooth shield and LCD screen to an Arduino Uno. I have two active low push buttons to increase or decrease the variable desiredTemp. This value is meant to be displayed on the ...
0
votes
1answer
385 views

ATtiny84 vs ATtiny85 consumption

I'm doing a comparative study between ATtiny84 and ATtiny85, and I found from the datasheet that ATtiny84 consumes less current, is that normal even if it is bigger in terms of size and number of pins?...
0
votes
1answer
443 views

RX/TX not working as intended

I am currently working on a project with a HC-06 module. I hooked it up accordingly like so: Arduino -> HC-06 5V -> VCC GND -> GND TX -> RX RX -> TX and I ran this code: void setup() ...
0
votes
1answer
922 views

Read from serial monitor till timeout

Is is possible to read from serial window till timeout? Actually, what I am looking for is a function that reads from serial monitor, and if no data is available in serial monitor, then it should ...
1
vote
1answer
92 views

can I design a User Interface to run on the arduino and display it with VGA? [closed]

I know you can design a user-interface in any language you choose and Link it with a Arduino via serial Port, but I am asking if I can design user-interface to run on the Arduino WITHOUT the need for ...
0
votes
1answer
214 views

Using the physical serial port on a BSFrance LoRa32u4?

I can use the serial-over-USB channel by simply using Serial in my code. The LoRa32u4 has an RXD1 and TXD1 pair on pins 20/21 (Arduino 0/1). https://docs.bsfrance.fr/documentation/11296_LORA32U4/...
0
votes
2answers
437 views

Reading serial.print data with unknown characters python [closed]

I've got some simple python code working to read the serial.print data that is being sent from my Arduino Uno. It seems to be receiving the values correctly and printing them fine, however it is not ...
0
votes
2answers
52 views

How to Write a function or Loop or program to receive fixed number of Integers or characters over Serial?

I am want to receive a 5 character hexadecimal input from user over serial port of arduino Uno. int count = 0; // count = 0 char userInput[5]; void setup() { ...
5
votes
2answers
589 views

Is the arduino hackable when using communication shields?

Let's say I have an arduino Uno connected to a W5100 ethernet shield. The arduino communicates with the ethernet shield using the tx0 and rx0 pins. When I upload a new script to the arduino using USB, ...
0
votes
1answer
118 views

send more than one integer on serial between Mega and nodeMcu

i have 2 integers i want to send them from Mega to nodeMcu i get them to talk to each other by this one on Mega :- #include <DHT.h> #define DHTPIN 2 // Selecting the pin at which ...
0
votes
2answers
60 views

Where can I find the complete list of Arduino Serial Command & Query Strings?

I am planning to use the Arduino as a replacement for a USB-Controlled Digital I/O device, which will be integrated into an existing C++ software package that I created. I understand that the Arduino ...
0
votes
3answers
73 views

How I can divide information stream from bluetooth hc-06?

All good afternoon or evening. I am having a problem writing a sketch for Arduino using Arduino UNO and Bluetooth HC - 06. My program does not divide the input stream of information into several ...
2
votes
2answers
523 views

What causes Serial.available() to become false after Serial.read() gets data?

As serial data bytes are being read from the serial buffer by Serial.read(), are they removed from the Arduino's 64-byte serial buffer altogether? In my current situation I'm using SoftwareSerial, ...
0
votes
1answer
80 views

Commucinate two arduino with each other

I have 2 arduino Unos where each one works properly on its own. I try to make them communicate with each other using serial communication (TX-RX ports). When I try to upload my code to them I get ...
0
votes
3answers
406 views

How to use the HC-05 properly?

It all started when I was working on my Arduino project, which involves an Arduino Nano, an HC05 module and a bunch of sensors (DHT 11, soil moisture and LDR) with Blynk App. Everything worked as it ...
0
votes
0answers
1k views

ESP8266-01 doesn't work when TX is connected (blue LED continuously ON)

I have an ESP8266-01 module and I want to use it with the Arduino firmware. Flashing my code into it via USB-TTL converter and my voltage supply is fine. The problem: I have to attach the ESP to a ...
0
votes
1answer
70 views

Cannot convert Serial String into char

I am trying to write a program to control 4 motors through the Serial port. I planned on achieving this by sending the motors' speed and direction instructions as a string, which is then converted ...
0
votes
1answer
3k views

strcmp() returns 0 when chars are different

I am trying to build a sketch that reads a single number from the Serial Monitor and uses it to light a 7 segment display with this number. I need to compare the input with the known values, stored ...
1
vote
1answer
333 views

Using Arduino Uno as USB to serial converter

Can I use my Arduino Uno as a USB to serial converter to program my Raspberry pi 0 over serial communication? My idea: Computer connects to Arduino via USB > Arduino connects with Raspberry pi 0 via ...
0
votes
1answer
444 views

Sharing serial Rx to read a push button on ESP8266-01

I'd like to know if it's possible, and if so how to use the serial Rx pin in a shared way to read a push button? I've seen people using it in sort of a dedicated way but my idea is to use it ...