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

Uno to ESP32 - HardwareSerial repeats value on ESP32's side even though Uno is disconnected

I have an Arduino UNO connected to ESP32 through voltage divider with TX0 from Uno to RX2 to ESP32. My goal is to send data from my Uno to my ESP32 through HardwareSerial. Here's my code for the Uno: ...
1
vote
1answer
39 views

How to fix serial communication?

I am trying to use serial communication to open and close a Blue Robotics Newton gripper. The gripper works with normal commands, but when I try to use serial communication to control it, it is ...
-2
votes
1answer
45 views

Problem with serial input from android serial usb app

I'm using two (nrf24L01 + Arduino Uno) nodes to communicate with each other. Serial input from node1 will be sent to node2. A special character 'p' when sent to node2, it will reply that it's ...
1
vote
4answers
169 views

How to connect more than one arduino serial port together

The idea is to connect more than 1 arduino slave to master as shown in schamatic simulate this circuit – Schematic created using CircuitLab The problem is TX slave can not just combine to ...
0
votes
3answers
203 views

What's the most direct way to assign Serial.read() bytes to an array?

I'm trying to send NMEA 0183 sentences through LoRa. Every dinstict NMEA message looks like several char arrays (sentences) followed by '\n'. In the below picture we see one NMEA distinct message: ...
1
vote
1answer
72 views

Send JSON body with SIM900 board

I'm trying to send JSON, but i'm not able to set Content-Type header. Other commands are successful: [23:49:41:856] AT+SAPBR=3,1,"CONTYPE","GPRS"␍␊ [23:49:41:899] ␍␊ [23:49:41:899] ...
1
vote
0answers
220 views

Why isn't my Arduino Nano Every recognized as a Nano Every and why won't it upload sketch?

I have a genuine Arduino Nano Every board that isn't showing up quite right. I actually have 2 hooked up to the computer on different ports and one of them, when I click on 'Port' shows as: COM12 (...
1
vote
1answer
98 views

Serial Monitor shows a continuous “word salad” without a loop

I have written a little program which should (at the end) host a little website. This is just my setup. But for some reason, it writes "srl?" endlessly onto the serial monitor. I just ...
-2
votes
1answer
555 views

What is the maximum size of Static Json Document in Arduino JSON?

I'm trying to do serial communication between Arduino mega and a esp8266, and having issues with determining the size of the JSON document. I have read that the receiver buffer size should be greater ...
0
votes
1answer
77 views

Assigning value to a struct byte order

So i have struct: typedef struct sendPacketStruct { byte header = headerByte;//0x55 unsigned int time;//2 bytes int height;//2 bytes }; And i do this: sendPacketStruct sendPacket; ...
0
votes
0answers
286 views

Arduino UNO not sending serial data to ESP32

Lately I've been struggling with Serial communication between Uno and ESP32. I'm trying to send a simple string (In my case "100") from my Uno to my ESP32. I made a voltage divider and I'm ...
1
vote
0answers
63 views

Help with reading and storing data from sim module

I'm using a sim800C module and an Arduino Uno. I want the code to send back an SMS to a number which sends it the password. So, if the sim module receives 'abcd' I want it to send back an SMS, saying '...
2
votes
2answers
88 views

printing the analogRead() functions result crashes Arduino

I have created a curcuit which reads the analog pin 3 auf the arduino nano and does other things dependant on the returned value. However I have problems regarding the analogRead() function. Whenever ...
0
votes
1answer
38 views

Weird effect of AVR C on USB-serial communication

I recently decided to learn direct port manipulation instead of builtin arduino routines. First I tried this piece of code void setup() { pinMode(13, OUTPUT); Serial.begin(9600); } void loop() { ...
0
votes
0answers
37 views

Sending array of bytes using serial communication from Mega 2560 to ESP 8266

The array is 16 analog inputs, till now these inputs are not connected to anything so they are random, except the first three elements of the array, connected to GND, in order to see the beginning of ...
0
votes
0answers
57 views

Ultrasonic sensors not working

The target of this is for the system to print "Done" when distance, measured by 2 ultrasonic sensor, is between 6-17 cm. This is my python code: import serial arduinoSerialData = serial....
0
votes
0answers
85 views

How to separate in columns the data contained in a barcode

I have the following code, which allows me by scanning a typical 128 barcode to write this code in SD card under the Header "FA" as well as the time and date of scanner under the Header &...
1
vote
1answer
85 views

inconsistent digital output on simple code

so im new on arduino coding, and i made this code, where i input from serial monitor and then use it as a command for digital write. the problem is, sometimes the code work perfectly but then when i ...
1
vote
1answer
107 views

else if is ignored if not Serial.println anything before

I encountered to me inexplicable behavior on an arduino uno. I'm serial reading a string from the serial monitor/python serial. This string is the conditional on several if/else if statements. The ...
0
votes
1answer
95 views

Weird RTC DS3231 Output only when saving the dates to variables

I am sorry to ask this question as I think it has more to do with my mediocre C++ programming skill than with the arduino. I do have a project where I want to use an RTC DS2131. I started out by using ...
-1
votes
1answer
236 views

How do I serial print a constant single string and a changing variable within it?

I want to print a single line including the variable "val" only once rather than looping or repeating of the same line and within it the val will change according to the reading. Is it ...
-1
votes
1answer
52 views

What are the correct techniques for implementing functional client access to an asynchronous serial interface?

This is not a question for beginners. I am implementing a functional interface to an asynchronous serial device connected to the Serial1 port on a mega. To ensure clarity, I want to implement a series ...
0
votes
2answers
456 views

avrdude: stk500_recv(): programmer is not responding, arduino pro

I'm trying to upload a sketch to upload the blink sketch to an arduino pro using a SparkFun Serial Basic Breakout (on Ubuntu 18.04). setup Within the arduino IDE I have the following set-up: Tools -&...
2
votes
0answers
70 views

Arduino EPROM dumper with utility program in C

I am writing EPROM dumper with Arduino UNO and utility program in C and I am using Ubuntu 20.04. The Arduino sketch works fine, but I am having few problems with the utility program. The first problem ...
0
votes
1answer
893 views

Arduino split comma separated serial stream

I'm trying to read serial data into Arduino. I usually use a Serial to USB cable to connect to the hardware and is sending data like 33,Z,35.0,F,1073741.824,I,0.0,0x68 33,Z,35.0,F,1073741.824,I,0.0,...
1
vote
0answers
32 views

Issue with seial communication [closed]

I am a beginner with c and arduino and am trying to create a 'whack-a-mole' style game. I am having problems with the 'score' variable. At the moment, I am just trying to get it to print to the Serial ...
1
vote
2answers
52 views

Serial port usage in code

I want to write a function that defines a serial port based on a flag but I'm not sure it's possible. For example: void writeToSerial(bool useSerial1) { SerialPortClass serialPortObject; // Is ...
1
vote
1answer
90 views

Strange Arduino Serial Behavior

I have a quirky question today. I have an Arduino MEGA 2560 with a very simple setup. It's connected to my pc over usb, and has one device connected on its onboard TX/RX2 port group. Whenever I open ...
0
votes
1answer
77 views

Fastest Communication from NodeMCU to Arduino Nano

For one of my projects, I need to transmit data from NodeMCU to my Arduino Nano, in real time, I used S-Bus, but it quite unsatisfies me, as, slight latency is taking place. I am transmitting a JSON ...
1
vote
0answers
512 views

I need an example of how to send AT COMMANDS to SIm7000E GPS+LTE module from ESP32 and reading those response in Serial monitor

Actually I need to make HTTPS post request using SIM7000 and ESP32 but the available libraries don't have a function for HTTPS post request, I wanna make this request using AT Commands. I need a ...
1
vote
2answers
598 views

How to make Serial.read() return an integer instead of an ascii value?

I want Serial.read() to return an integer instead of an ASCII value. For example, in the below code if I input 2, I want the output as 2 instead of 50 void setup(){ Serial.begin(); } void loop(){ ...
0
votes
2answers
62 views

Char buffer for serial input: char str[2] vs char* str = (char*) malloc(2)

I am using software serials on my Arduino nano to read data from my esp01 in functionality testing for the software serial. I simply make the esp01 to send a string "OK" to an Arduino's ...
2
votes
2answers
95 views

Arduino Yun receives UDP packets but prints them with gibberish

Arduino Yun is set to receive UDP packets. It receives those data with some gibberish. How is all set up: Arduino Yun (acts as a server) is connected through Ethernet to a PC which is (through WiFi) ...
1
vote
1answer
196 views

Why is there a need of use delay() after using Serial.flush() in the program

This code is a part of a long code for understanding serial communication and the functions related to it. char buffer[18]; int red, green, blue; int RedPin = 11; int GreenPin = 10; int BluePin = 9; ...
0
votes
1answer
73 views

How to send a number as a byte?

I want to send a number between 0 and 120 as a byte over Serial port. I'm working on a project that involves sending ultrasonic sensor readings over Bluetooth to an Android. I would like to send the ...
0
votes
5answers
125 views

Simple serial message not consistent (sometimes jumbled up)

I have the following code, it works (most of the time) - yet it's not 100% reliable and now and then will send through a double message on one line or 2 subsequent alpha characters: const byte ...
1
vote
1answer
32 views

Serial broken into two shorter shorter strings

I'm trying to do a serial read: if (Serial.available() > 0) { int inputValue = Serial.read(); Serial.println(); Serial.println("I got this:"); Serial.print(inputValue, BIN); } ...
0
votes
0answers
390 views

Can the Arduino Pro (Portenta H7) communicate between threads?

I have an application that runs a stepper motor from an Arduino board. This requires use of the delayMicroseconds(int us) to control the speed at which the motor turns. For this reason, all code ...
-1
votes
1answer
348 views

QR code scanner connected to arduino won't respond

i bought a qr code reader from banggood, here's the link: https://www.banggood.com/GM65-1D-2D-Code-Scanner-BarCode-Reader-QR-Code-Reader-Module-p-1440532.html?rmmds=buy it works pretty well and i'm ...
1
vote
1answer
100 views

Dragino lg01-p problem with serial monitor

i have a dragino lg01-p lora gateway to which i successfully communivate through lora with an arduino and i can program it through network as expected and seen in its manual with the demo client-...
1
vote
0answers
38 views

Serial Output on ESP8266 doesn't work on 2/3 of my boards

I have 3 NodeMCU 1.0 12E ESP8266 boards. Issues Two of them require me to unplug and replug in the boards every time I want to flash code, and nothing appears on the serial output with this simple ...
0
votes
1answer
121 views

Liquid Crystal LCD and serial monitor not playing well together

On my Arduino Uno, when I'm not using the serial everything seems in order: #include <LiquidCrystal.h> LiquidCrystal lcd(1, 2, 4, 5, 6, 7); void setup() { // put your setup code here, to ...
1
vote
0answers
55 views

Workflow when using Emacs, Arduino-makefile and Serial monitor?

I'm trying to develop code, compile, upload and use the Serial monitor for debugging of a script for an Arduino Pro Mini. I'm using Emacs as my IDE. I'm having trouble determining the exact sequence ...
1
vote
0answers
285 views

Connecting OV2640 with 17 Pins Binocular Camera module, to any microcontroller (System clock on module pin 18 -NC)

These pins are on the module: 3.3V GND VSYNC SCL SDA HREF D0-D7 DCLK PWDN I have tried many codes and connections of the OV7670 Monocular cameras, none seem to work(Instructables , Circuit Digest , ...
1
vote
0answers
145 views

Multiplexing HID and serial on ATMega32U4

I designed a custom ATMega32U4 based Arduino Leonardo board. I'm using MHeironimus/ArduinoJoystickLibrary to implement an HID joystick. I need to create also a virtual serial port to send NON joystick ...
1
vote
0answers
463 views

Problem with gps.encode() using TinyGPS library

First, see the schematics (attached). The GPS is working properly when I write code only for reading data from it as below: //Connect with pin 18 and 19 #include <TinyGPS.h> //long lat,lon; //...
0
votes
2answers
136 views

How to interpret Serial data received by Bluetooth module

I'm experimenting with a hc-05 knockoff the JDY-30 and am confused about the Serial data I'm getting from it. I downloaded an app called BlueUino to send commands from my Android to my Arduino Uno via ...
0
votes
2answers
2k views

Serial Interrupt

I want to create a simple program, that responds to me sending a character over the Arduino IDE console. I am using an arduino UNO. Here is my program: volatile bool MeasReceived=false; ISR(...
1
vote
1answer
57 views

Using RX TX pin

Can i use pin RX TX on Arduino Uno as reguler pin ? . For input and output pin , because two digital pin on my board doesn’t work . Thank’s
2
votes
1answer
59 views

3-instruction remote machine coding Arduino Atmel chip over a serial line from a tethered (host) PC

I'm trying to write a program for AVR Atmel 328 chip on Arduino Nano board that will allow me to send machine code instructions to the chip over a serial line, run/execute them on the chip, and ...

1
3 4
5
6 7
42