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
1
vote
2answers
23 views

Printing the array using print and serial write function in Arduino Uno

I have, one program with only using printing array and other with serial write and print function for the array, while using serial write and print function I get these extra characters between the ...
1
vote
1answer
115 views

How to convert a String to Hex array

I am trying use a HMI display. If I want to send a data, for example I want to write "TOPWAY" to 0x00000080 address it should like that: Serial.write(0xaa); // packet head Serial....
0
votes
1answer
49 views

Using index of to search for multiple characters

In my Arduino project, a string will be received. I understand using .indexof to find the placement of a certain character in the string. My problem is that I need to find the first occurrence of any ...
0
votes
1answer
49 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
2answers
86 views

how can I accurately recieve potentiometer values over the USB port?

I want to read the analog values of my ardunio uno into a separate c++ program. On the Arduino I have a serial port initialized for 9600 baud: int sensorPin = A0; // select the input pin for the ...
0
votes
0answers
102 views

I need all these codes in one single code 1) Relay 2) Motorised ball valve 3) Ultrasonic sensor [duplicate]

I have three separate codes for relay, motorized ball valve and for ultrasonic sensor. I am unable to run all the three codes at once in same serial monitor. I am pasting all the three codes below. MY ...
1
vote
1answer
20 views

Arduino Nano not recognized by Mabook Pro M1

I am new to Arduino and I have ran into an issue. When I first tried to plug the arduino nano (after market, from ebay) into my computer (Macbook pro M1), nothing happened. Then I downloaded the ...
1
vote
0answers
38 views

Program a mega2560 from a different Serial port

I want to be able to use my HC-05, currently on Serial3 to download code to on my 2560 from a connected android tablet. I'm currently running MegaCore, which has optiboot on it. I've looked for ...
2
votes
2answers
80 views

Stuck In While Loop

So I'm a beginner at Arduino and I have to light up an LED grid to show digits from 0-9. I wrote a bit of code (with the help of some people) and it's like 90% done but there's this ONE problem. I ...
1
vote
0answers
48 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
1answer
31 views

Arduino randomly stops sending data to python over serial

I want to send commands to Arduino over USB Serial from my python program and Arduino should send back received command to make sure data wasn't lost. However Arduino randomly stops sending data back. ...
1
vote
1answer
52 views

Arduino NANO clone not detected by computer

I recently purchased 5 Arduino Nano clones and on my Windows PC they were all working fine. I then gave one to a friend and after installing the CH34OC driver on his Mac he was able to program a ...
0
votes
1answer
84 views

Listening Serial Ports

guys. I need your help. I have 6 Serial Channels and I need to listen this channel and be sure which channel is working? How can I do that? Can I listen this channel by using digital inputs? Or Do I ...
1
vote
1answer
61 views

Sending Data Between Arduino Nano and D1 Mini

I am sending data from Arduino Nano to D1 Mini, Transmitter is Arduino Nano Transmitter Code: #include <DES.h> #include <SoftwareSerial.h> SoftwareSerial link(2, 3); // Rx, Tx DES des; ...
0
votes
0answers
42 views

Serial communication transfer data btw 2 arduino

i want to transfer 3 data from master to slave and turn on / off led in slave. HOW COULD I TRANSFER 3 DATA IN SERIAL COMMUNICATION BTW 2 ARDUINO UNO? if data1 = 0 in master , led 1 = LOW in slave, if ...
1
vote
0answers
18 views

Writing multiple inputs to serial port using a while loop

I am trying to get the serial monitor to prompt me to input two settings - the PWM level and the Resonance level. I am being prompted to input the PWM level, but before I can input the Resonance level ...
0
votes
2answers
51 views

Arduino Serial Monitor Input 3DES Encryption

I am trying to 3DES encryption using Serial Read, Found this 3DES Sample code in Github, #include <DES.h> DES des; void setup() { Serial.begin(9600); Serial.println("Hello!"); } ...
1
vote
1answer
32 views

How do I control a servo with python through an Arduino

I'm trying to make it so I can control 2 servos with data that I get from a python script that tracks my face. I have found 2 libraries that do this:pySerial and pyfirmata. Is one superior to the ...
5
votes
1answer
1k views

Serial monitor can't display float and double values with absolute greater than 4294967040=2^32-2^8

I have the following sketch: void setup() {} void loop() { float af = 4294967040.0; float bf = 4294967240.0; double ad = 4294967040.0; double bd = 4294967040.00001; Serial.println(af); ...
0
votes
1answer
37 views

Arduino nano BLE sense Serial port Suddenly stopped working

Last week I got my new Arduino nanao ble sense. Today I was executing a code on it which reads every sensor data on it and print it on serial monitor. I changed some parameters in my code and upload ...
1
vote
0answers
33 views

I am interfacing relay, signal isolator and a ultrasonic sensor using one Arduino UNO. How can I control using one serial monitor and one code? [closed]

char a; // Using Pin 3 const byte numChars = 32; char receivedChars[numChars]; // an array to store the received data boolean newData = false; int dataNumber = 0; // new for this version ...
1
vote
0answers
35 views

Serial communication detect

guys. I am workin on a project. I have two channel for Serial RS232 communication. Main and Stand-By channel. If Main channel has some problem and, cannot communicate for 15 seconds then I want to ...
1
vote
1answer
30 views

ESP8266-01 module “AT” command testing not responding

Firstly I have connected the Arduino UNo to Esp8266-01 Module and uploaded the Simple Blink Sketch using Arduino Uno and It responded correctly as in the Blue Led Light on Esp8266-01 was blinking ...
1
vote
1answer
23 views

Trying to use Serial to communicate between two D1 Mini's

I'm trying to connect two D1 Mini's together as a POC. There is a switch on one and a 7 segment display on the other I have the pins setup from TX>RX and RX>TX First ESP8266: int SWITCH_PIN = D5;...
1
vote
1answer
49 views

Serial baud rate is less than specified

I want to read values of arduino pins and send it to PC via USB cable. The problem is that byte writing/reading happens at a rate which is ~10 times smaller than specifies baud rate of a serial port. ...
1
vote
0answers
24 views

ESP32 sending data of type uint16_t(or anything except for uint8_t and char*) over bluetooth(classic) serial

I'm making a custom gamepad with an ESP32 and the joystick output is read by an ADC using uint16_t analogRead(uint8_t pin);. Now that I want to send the data and receive and parse it, I ran into a ...
1
vote
0answers
33 views

Parse the data incoming from the buffer of Serial.readBytes()

I want to parse the data of the incoming buffer from the serial read bytes, but I don't really know how to get the data out of the array and save it to different variables. This is my code: void setup(...
1
vote
1answer
42 views

Can Arduino Due be programmed with both USB ports connected?

It seems, due SAM-BA (SAM Boot Assistant) inside ATSAM3X8E being listening to both Native USB and UART USB ports after a Reset for programming, allowing talking with SAM-BA, this time from your PC, ...
1
vote
1answer
62 views

Dealing with USB Unplugging?

The following code, debugs SerialUSB Native Port, plugged to a PC, and connected through a Terminal Monitor (such as Termite, with any bps, 8N1, RTS/CTS). At start, the ports seeks for communication, ...
1
vote
1answer
52 views

How to connect SIM7100A to Arduino?

I've been searching for how to connect a SIM7100A module to an Arduino (Uno or Mega), but I haven't been able to find any posts anywhere, nor videos nor any kind of documentation that shows how to do ...
0
votes
1answer
25 views

Run computation only on request over serial

An Arduino Nano is set up to perform A/D conversions and send results out over Serial. Currently the code structure is like loop() { delayUntilNextTargetTime(); measure(); ...
1
vote
1answer
55 views

Custom assert() implementation: not printing the error message

I am writing my own assert() macro on Arduino as shown below. When I run it from the main() it always works correctly (prints the message and gets into an infinite loop), however when I call it within ...
0
votes
1answer
61 views

how to communicate between Arduino Uno and ESP8266 via TX/RX Serial ports?

I am working on a project contains : ESP8266 as a WebServer that has a dashboard on web browser to control 8 relays connected to arduino. arduino uno board to control relays based on commands come ...
1
vote
1answer
63 views

Need HELP!! Serial communication has a very “Strange Problem”

I am working on building a serial command receiver. The idea is came from the boot loader. However, I got a very strange problem that I have no idea what could cause it. As the first screenshot show, ...
1
vote
0answers
33 views

arduino labview basic serial communication

I am trying to have a 2way serial communication between LabVIEW and Arduino. I tried to make a basic program to grasp the concept but it does not seem to work. Labview (2 int values) >> Arduino ...
2
votes
0answers
69 views

Arduino freezes if I do NOT do Serial.println() at least TWICE

Hii I have a big project, and found this when I tried to remove all the test code. To summarize: I have a variable that I use as a buffer for string operations called char internalbuffer[32] declared ...
1
vote
0answers
21 views

Cannot instantiate SLIPSerial object used in OSC/SLIPSerial classes for Arduino

Hey I'm trying to test out the CMAT/OSC library for Arduino and just want to get up and running sending SLIP encoded OSC messages. I've been able to observe the typical Serial monitor when sending OSC ...
1
vote
0answers
40 views

Help building a digital relay board [closed]

I am looking make my own version of theses digital relay/FET controllers so I can have more usability and matrixes. Switch pro sp9100 it looks like to me they send a serial signal to the controller ...
2
votes
1answer
47 views

Serial.println won't format DEC

This is weirding me out. So I wrote to the EEPROM and I would like to read from the address and format it in Base 10, err... Decimal. The normal number thingy that's not ASCII. But it keeps returning ...
3
votes
1answer
294 views

Getting all data of my JSON object from Serial.read() at once

I'm new to Arduino and I'm building a project that fetches data from a website (using ESP8266) and then transfers them to my Arduino UNO via serial port. Data coming from ESP8266 every 20s - [{"x&...
0
votes
2answers
40 views

Serial communication between Arduinos

I'm trying to send data from Arduino Mega to UNO. The master code sends characters 'x' and 'a' every half second to the slave Arduino UNO. Slave receives the characters and switches the state of the ...
1
vote
1answer
74 views

How can I run Hello World using Serial Monitor in Tinkercad Arduino simulator?

I want to achieve printing Hello World in the serial monitor using Tinkercad to simulate Arduino. Here is a very simple example code for real Arduino. void setup() { // put your setup code here, to ...
1
vote
1answer
35 views

Teensy 4.1 serial communication with 7N2 (7 databits no parity 2 stopbits)

I have ported a project from arduino Due to a teensy 4.1 In the project I read data from a sensor which speaks serial at 7 databits, no parity and 2 stopbits (no configurable). Now it seems that ...
1
vote
1answer
29 views

Arduino Mega reading from external sensor Issue

I have one external sensor and I want it to be connected with Arduino. The sensor came up with a usb cable and the pin out diagram is also given in the data sheet . When I simply connect the the cabe ...
0
votes
1answer
29 views

Struggling to understand how Bluetooth serial is related to USB on Arduino

I've recently acquired a Bluetooth module to attach to my Arduino Uno, but I'm trying to draw parallels to the standard method of communication that I'm familiar with, which seems to be just directly ...
2
votes
0answers
43 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
0answers
40 views

communication between python and arduino

I have a python program that calculates an integer based on some parameters. I am not including the full code here because because it has a lot of deep learning stuff , but the relevant block is: #...
0
votes
1answer
41 views

Serial communication of strings

I used this simple code to understand the basics of serial communication. This achieves simple communication between the computer and arduino: String receive_buffer; void setup() { Serial.begin(9600)...
1
vote
0answers
43 views

Serial1.readString() on arduino mega returns an empty string

i have been trying to read text message from a sim module over serial1 of arduino mega, when i use the code msg = Serial1.readString(); the readString return an empty string i dont know if this is a ...
0
votes
1answer
85 views

Is it possible to read extended ASCII from the serial port?

My project requires that Serial.read() be able to accept extended ASCII characters (0x80 <=> 0xFF). For example, I would expect reading the character ¥ to yield the decimal value 157. Instead, ...

1
2 3 4 5
42