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
1answer
16 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 ...
1
vote
2answers
33 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) ...
0
votes
1answer
28 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
25 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
0answers
27 views

Control Servo motor via Python GUI (PyQt) component “QDial”

I want to control a servomotor via a Python Gui (PyQt) component "QDial". Hopefully the servomotor should rotate "simultaneously" with the Dial in GUI. Below is the related code: ...
0
votes
0answers
30 views

Why Serial.begin does not use INPUT_PULLUP on RX

Im programming esp32 using arduino framework and today i run across some noise issues on serial lines and i went to see the underlyings of the Serial.begin() method. In the execution of this function, ...
0
votes
4answers
82 views
+100

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 ...
0
votes
1answer
22 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
40 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 ...
0
votes
0answers
27 views

How do I recover when Arduino USB Serial Port randomly disappears?

I'm using my computer remotely and have an Arduino Every attached to a powered USB 3.0 hub. Anyway, the Arduino is part of a hardware tool that does some nice things for me. I communicate with it ...
-1
votes
1answer
34 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 ...
0
votes
1answer
15 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-...
0
votes
0answers
26 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
28 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 ...
0
votes
0answers
32 views

Two Arduino and MAX485 - How to send command and get reply without delays?

i want to use two Arduino with MAX485 chip trancievers in order to communicate between them in my home automation project. Actually i've made a simple sketch that sends from the master to the slave ...
0
votes
0answers
20 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 ...
0
votes
0answers
26 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 , ...
0
votes
0answers
28 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 ...
0
votes
0answers
21 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
44 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
63 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(...
0
votes
1answer
48 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
42 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
vote
1answer
52 views

Flash firmware with hex file over serial with Python (no avrdude, Arduino IDE)

I'm trying to make a Python function in the TCLab package to flash firmware to an Arduino Leonardo (32u4). I can compile the TCLab ino (firmware) and deploy with the Arduino IDE or with the Python ...
1
vote
1answer
30 views

NodeMCU wiring for Serial1?

I'm trying to get telemetry data to be sent out Serial1 on the NodeMCU board. I read that TX is (by default) mapped to pin D4. Ultimately, there will be a Raspberry that will be listening for ...
0
votes
1answer
42 views

How to send 2 data to processing from Arduino

I am new to Arduino and processing so sorry for any mistakes. I have a problem with sending multiple data to processing from Arduino. I can send 1 data easily ut I can't send more than 2 data can ...
0
votes
0answers
28 views

When trying to write multiple bytes to a serial port, all 0x00s are skipped

I am using a dynamixel XL320 servo, and am trying to control it using an Arduino Uno. I’m trying to send a simple packet that turns on an LED. I believe the correct format of this packet according to ...
0
votes
2answers
68 views

ESP32 runtime error in 2d array

I am trying to serial print the value of b[0][0]. Has to be zero but it dose not work! Here is the code void setup() { Serial.begin(115200); byte b[321][241]; Serial.println(b[0][0]); } void ...
0
votes
3answers
47 views

Formatting variables from a variadic function

I have a function that concatenates a print line, however I am having trouble getting some of the strings to format correctly. Using Serial.print formats the output from keypad.getKey() correctly, ...
0
votes
0answers
20 views

Serial Hangs with multiple PN532 nfc reader and a TCA9548A

I am trying to use multiple PN532 reader. I have put all my readers on a multiplexer (TCA9548A). The script works well, but when I move my tags on readers sometimes the serial says to me there is an ...
0
votes
2answers
75 views

Arduino IDE Serial Monitor - how to send NUMBERs - not charcters of numbers

Serial link send and recieves Bytes. Serial monitor at Arduino IDE reads it's input as character. So if I type '0' in serial monitor, then FW will read byte 48 - I don't want to implement some silly ...
0
votes
1answer
40 views

Is my sketch 'thread safe'?

I come from a .Net background, typically I would 'lock' operations on an integer when I have thread-safe requirements. I'm not sure that applies to my sketch here? Could I potentially bypass an ...
2
votes
1answer
47 views

Arduino UARTS Auto addressing slaves

i'm using this serial topology to connect my Act ATmega328p (Arduino) slaves together to a master ESP32. They are in total 10 ATmega328p slaves and one master: With this type of wiring i'm sure that ...
0
votes
2answers
75 views

the use of the Arduino's EEPROM

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here #include<EEPROM.h> void setup() ...
0
votes
1answer
24 views

Issues with reading numbers from serial port

I've built 2 motor drivers for a robotics project and need to set positions that I want the motors to move to, and read that using the arduino. The arduino then uses a rotary encoder to implement a ...
0
votes
2answers
29 views

Hardware/software serial for HC-05

can anyone please tell me the whole difference between hardware and software serial for the HC-05. I read UART,USB cable, serial and I was like really confused so what is the difference and advantages ...
0
votes
1answer
26 views

HC-05 master and slave

I have a silly question that came to my mind when communicating between HC-05 and A smartphone, the smartphone is considered as the master, and the HC-05 is considered a slave. master will send data ...
0
votes
1answer
48 views

Serial Read Data Loss With Arduino Nano

I am trying to use Serial reading from a python serial code (which is running on my Jetson Nano) in my project, but in some loop in my code, my data is receiving wrong. I use Serial.readBytesUntil() ...
-1
votes
1answer
28 views

Bluetooth: read a user provided value and then obtain time from an Android phone

I'm new to Arduino and try to accomplish following 2 things (via Bluetooth module connected to an Android phone): read an integer value provided by user. obtain current time from the phone (the ...
0
votes
1answer
26 views

Reset HC-05 from within Arduino sketch

I have an HC-05 Bluetooth module attached to an Arduino Mega; the module is paired with a Raspberry Pi and fed data via a python program; there's roughly one send and one receive per second of about ...
0
votes
2answers
30 views

HC-05 TX,RX divider rule

I'm using the HC-05 Bluetooth module but I'm confused about the TX,RX pins. I want to know when should I connect the RX to a divider circuit to convert 5v to 3.3v. Because while searching, I saw both ...
0
votes
1answer
59 views

CH340G Uploading problem

I've tried to copy CH340G from other schematics and existing Arduino Uno Clones... Searched online & StackExchange but no good :/ My problem is almost the same as this one Here is my schematic ...
0
votes
0answers
41 views

Arduino Nano 33 BLE work with its Bluetooth and GPS synchronously?

I am using Arduino nano 33 Sense BLE in which I want GPS to run and display its location . The GPS module which I am using is Adafruit GPS. I want both Bluetooth and GPS to run synchronously. But only ...
0
votes
1answer
32 views

Terminal read-only serial monitor w/o blocking serial port for sketch upload

I would like to have all serial output from Arduino (nano) dumped to the terminal in Linux, without blocking the serial port for uploading new sketch version (for quick debugging loop), when using ...
0
votes
1answer
49 views

Reading from Arduino Serial USB using C++ [closed]

In my Arduino I have loaded the program void setup() { Serial.begin(9600); } void loop() { Serial.println("Hello from Arduino!"); delay(1000); } From my computer (Raspberry Pi), I'm executing ...
0
votes
0answers
22 views

LUFA with pro micro 3.3v 8mhz not working

I am trying to flash my pro micro 3.3v from sparkfun with a Lufa project to make it act as a pokken controller, i am using this project Github Project I have modified the makefile for 8mhz and set the ...
0
votes
1answer
29 views

Confused as to how 2 of my interrupts are firing from just 1 pin input?

I have the following code which uses interrupts to set a flag for whether serial IO should happen to update my PC about a particular pin input. So I have interrupts on pins 2 and 3. I am using the ...
0
votes
3answers
48 views

How long does my digital pulse need to be for it to be read?

I have the following really simple code. On every iteration it'll read the first pin, and if it's high - do some serial IO. Then do the same with the second pin. Nice and simple, works during my tests....
0
votes
1answer
56 views

Problems running Arduino project off a 9V battery

I have been working on an Arduin Uno Rev2 project for a while now. I have been developing using my MacBook, downloading code through the USB jack running it, monitoring the serial output on my MacBook,...
0
votes
2answers
51 views

How compile an Arduino program for a desktop PC

I have an arduino program that only does serial communications with a little bit of math, and I am writing another one to communicate with it on a second arduino. For testing purposes I was hoping I ...

1
2 3 4 5
38