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.

1
vote
1answer
10 views

Serial Communication between arduino and nodeMCU

I am trying to connect a nodeMCU to arduino mega using serial communication so that i can read data from firebase. I have put the following code on the NODEMCU. #include<SoftwareSerial.h> //...
2
votes
0answers
409 views

ArduinoDue - Matlab: SerialUSB.write() sends ASCII?

I'm trying to get some binary data from an Arduino Due to Matlab. Basically this is the setup: Due: byte usbMsg[33]= {0}; // filled with dummy as example usbMsg[1] = '00000001';// in[3]; usbMsg[2] ...
0
votes
1answer
28 views

How to utilize SPI Serial bus on a ATSAMD21G18?

Like the title suggests, I have a ATSAMD21G18 microcontroller that I want to interface with a LTC6803-4 chip, but I'm not sure how to set up the SPI bus on the microcontroller, and the datasheet ...
0
votes
1answer
30 views

About how to calculate execution time of avr code [on hold]

I have vector nav VN100 IMU sensor.I have interfaced it with ATmega32,reading roll,pitch and yaw angels in ASCII format and convert them to float.I want to control a servo motor according to the roll ...
2
votes
2answers
331 views

What is the best delay to use between characters sent to the serial port

I have an Arduino Uno. It's role is to echo back what it receives. But if I send it a stream of ascii characters it starts to error after the first one. Occasionally it gets the second character ...
1
vote
1answer
61 views

Parsing Integers from Serial data stream

I'm trying to send sensor data from my Remote Control to my Bot via Bluetooth. It's 6 numbers that I would like to have read as integers on the other side. I'm printing them to Serial on the Remote ...
0
votes
2answers
31 views

Parsing Arduino Receiving Strings

I'm currently using google geolocation to get location data to one nodemcu and sending it through serial to another Arduino. The serial command I'm getting right now is, 1.450187T103.824745 I'm ...
0
votes
1answer
460 views

Badly formatted characters using JDY-30 bluetooth module

I have a JDY-30 bluetooth module and have it wired like this (except using an Arduino Uno): It is working, but I need to use it with a 115200 baud rate instead of the default one of 9600. I also got ...
5
votes
2answers
890 views

Detect if Serial1 and Serial2 are defined, at compile time

I have my library that uses Serial, Serial1 and Serial2 to establish various logging scenarios. Library user would define the config at class constructor, using simple byte constants like 0, 1 and 2. ...
49
votes
11answers
266k views

How do I split an incoming string?

I am sending a list of servo positions via the serial connection to the arduino in the following format 1:90&2:80&3:180 Which would be parsed as: servoId : Position & servoId : Position ...
0
votes
2answers
58 views

serial port on RPi

In the Arduino IDE on my RPi on the top there is a header that says, File, Edit, Tools and help. Following a Magpi article it said to go to tools then serial port and change that depending on what ...
0
votes
0answers
29 views

Sending commands to an STM32 chip via UART with Arduino Pro Mini

I am having trouble making an Arduino Pro Mini send commands via USART to an STM32 chip. The serial communication protocol is currently set to 9600 baud rate with no flow control or stop bits. Is ...
0
votes
1answer
13 views

Serial communication questions

I have to arduino's which are communicate using rx/tx. Arduino1 (A1) send data over serial to Arduino2 (A2). My questions are: 1 - If A1 do Serial.print each 50ms and A2 reading serial each 100ms ...
1
vote
1answer
46 views

Dynamic Serial port selection and use without instantiating all Serialx objects

I have an arduino project that reads a config file from SD and then receives data on a serial port that is specifed in the config file. I therefore need to instantiate the Serial (Serial0), Serial1,.....
1
vote
0answers
993 views

Reading Serial Data Using readBytes() and Use of Serial.read()

I'm trying to mix Serial.read() and Serial.readBytes() when reading over one of the Serial ports on my Arduino Due. I thought that using Serial.read() would clear what is on the serial, and then ...
1
vote
2answers
1k views

16Hertz Uno R3 Board vs Arduino Uno R3 Board

I bought a 16Hertz Uno R3 Board. When I installed the driver and the Arduino IDE, in the IDE`s menu I saw: Tools -> Board -> Arduino Uno was selected by default which is great, but... ...
0
votes
1answer
27 views

Getting two trinkets to talk to each other via the serial pins

I'm trying to make a quick proof of concept of two trinket M0s talking to each other via their RX and TX pins and I'm not able to get it working. I uploaded sender and receiver sketches to two ...
0
votes
3answers
2k views

How do you control the amount of times the void loop loops per second?

int firstAnalogPin = 0; int secondAnalogPin = 5; int firstVal = 0; int secondVal = 0; void setup(){ Serial.begin(9600); // setup serial } void loop(){ firstVal = ...
0
votes
1answer
27 views

Using Serial.write() to send a uint32_t send one byte x4 or send 4 bytes x1

In the IRremote library, IR signals are decoded and held in results.value. My project uses the NEC protocol which is 32 bits, so the IR code will always be 4 bytes. uint32_t dCodedIR; // // code ...
2
votes
2answers
3k views

Python - Arduino communication not reliable

I'm trying to establish basic communication between python and my arduino due. I have managed to get a message sent to the arduino and sent back, but the code that achieves this task does not give ...
1
vote
0answers
2k views

save bytes from Serial into ROM (EEPROM)

I am trying to save an incoming text from serial into the ROM of the Arduino using EEPROM. I found out that you can only save a byte at once. So I thought I could do it like that: #include <EEPROM....
0
votes
0answers
67 views

sending string from Arduino to ESP8266 works on UNO but not Pro Mini

I have a project where I am getting sensor data and sending it over to an ESP8266-01 to send to ThingSpeak. After some work I got it to work. So like I real smart person I decided to replace the ...
-1
votes
1answer
112 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 ...
1
vote
2answers
718 views

Dot Matrix Display with Arduino UNO (PROBLEM)

I faced a problem in my graduation project and I hope you can help me to solve it :) My project is connecting Arduino Uno to 16x32 Dot Matrix Display(DMD) and display messages on it from VB.net ...
1
vote
0answers
51 views

I want to modify setup, to also keep the serial USB port opens so I can send strings via a Raspberry Pi

I am trying to modify the original code from these guys GRA & AFCH, who have made an Arduino Sketch Program that runs a Arduino powered Nixie Clock. Here is the link to their Firmware file:...
0
votes
4answers
119 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
48 views

Remembering a colour

Hey guys I have a led grid. it's 8 sides that are addressable with the bytes '1' through '8'. (a Kinect is sending these bytes through processing) I have also creates three buttons in processing that ...
1
vote
0answers
34 views

HC-05 Bluetooth fails AT+LINK

I'm trying to get a HC-05 connected as master to a bluetooth ELM327 OBD scanner. The HC-05 is accepting AT commands, no problem. This is the sequence I use: AT+RMAAD (Clear any paired devices) AT+...
0
votes
1answer
2k 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
57 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 ...
1
vote
0answers
51 views

Erratic behavior from 'randomly' generated values in array

Currently working on a data collection algorithm on the Arduino MEGA (ATMega1280) and I've run into a problem with some of the code I've written. I feel my problems may be stemming from the way in ...
0
votes
0answers
37 views

MEGA2560 only starts program after pressing RESET button multiple times

I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are ...
1
vote
1answer
148 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
42 views

Arduino RS485 shield to RS485 temperature & humidity sensor

I’m try to get data from rs485 is not work please advise to me. 1. Try to connect PC usb485 to DY-MD02 is work. Send command “AUTO” or “READ” 2. Try to Arduino rs485 shield to DY-MD02 is not ...
0
votes
0answers
32 views

How to merge multiple sensor inputs into an array and display in serial monitor and later store in a CSV file? (with arduino &python) [on hold]

I am trying to fuse 3 sensor inputs into one array by taking them in an array with the help of analogRead function in Arduino. But I am failing to do so. Later on, when doing this, I need one general ...
0
votes
1answer
20 views

Arduino Mega not recognized on Raspberry Pi 3b+

I'm developing an interactive LED table for an university assignment that is being controlled by an Arduino Mega2560 which gets the information about which LEDs should be lit in which colour from a ...
0
votes
0answers
13 views

I am making bluetooth control car using uno [duplicate]

Arduino: 1.8.9 (Windows 7), Board: "Arduino/Genuino Uno" Sketch uses 2080 bytes (6%) of program storage space. Maximum is 32256 bytes. Global variables use 189 bytes (9%) of dynamic memory, leaving ...
2
votes
1answer
64 views

Arduino wrap or subclass print() to work with multiple Serial

I am writing an Arduino program that uses Bluetooth on Serial1 to print text to a Bluetooth terninal on an Android phone and also normal Serial to print text to the serial monitor on a laptop. I would ...
1
vote
1answer
318 views

Particle Electron to RS232 Serial gibberish

I've spent all day trying to monitor serial console output of a router. I'm using an "ebay" MAX3232 RS232 to TTL converter connecting only GND, TX and RX to the Electron. Trying to simply monitor the ...
1
vote
0answers
218 views

GSM serial get event or read the whole input?

I am using an Arduino Uno with GSM shield, trying to read some SMS. Here is my code. #include <SoftwareSerial.h> SoftwareSerial SIM900(7, 8); char incoming_char=0; void setup() { Serial....
4
votes
2answers
6k views

ESP8266 12e Arduino IDE outputs garbage values on serial monitor

I recently started using the ESP8266 12E (Amazon link) and hooked the board up to the Arduino IDE. When trying to run any of the example sketches, all sketches compile and upload correctly. The blink ...
0
votes
1answer
49 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
0answers
789 views

Arduino Mega 2560 SoftwareSerial Not Working

We have an xBee Pro S2C that is using this library (https://github.com/andrewrapp/xbee-arduino) very well on a Software Serial connection to ports 2 and 3 on an Arduino Uno. However, when we take the ...
1
vote
0answers
220 views

MATLAB and Arduino communication

I have to send from MATLAB to Arduino a char line 'S' to start the Arduino program and send back values from a sensor. This is my MATLAB code clear; delete(instrfind); s = serial('/dev/cu....
1
vote
0answers
395 views

Send .wav file from SD card to NodeMCU via serial port

I was able to send a text file in the SD card to NodeMCU using the serial port of an Arduino Mega using this code: if (readSerial1 == "Okay I'm ready") { myFile = sdf.open("uid.txt", FILE_READ); ...
0
votes
1answer
32 views

Python Arduino Serial Communication Speed

Background : Im controlling serial manipulator using Arduino Uno with Servo Shield. Servo work at 20 ms, so i would like to send command atleast every 2.5ms. Command sent from PC. I send 8 bytes of ...
1
vote
0answers
594 views

Make RFID Tag as a variable

I want to make RFID Tag as a variable, and push it to the web server. But I struggle to do the Serial.read function. Any solutions? Here is my code #include <ESP8266WiFi.h> #include <SPI....
0
votes
1answer
27 views

Can Arduinos keep a 500mu timer?

I need to output a serial message on a 500 microsecond interval (10 bytes), can be a little slower but no more than 1 milisecond between messages. Can it be done with an Arduino? I know there is a ...
1
vote
0answers
363 views

Serial Monitor Stops Working

I am using a DIY colour sensor (RGB LED and LDR) and a servo to make a skittles sorter. I am testing out just the colour detection now and printing the RGB values to serial. It worked fine until I ...
1
vote
2answers
95 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 ...