A serial port is a physical interface through which data is transferred (uni- or bidirectionally) one bit at a time. Largely superseded in the consumer market by USB, serial connections are still commonly used in many other specialist applications. Typical applications include scientific/medical ...
1
vote
1answer
59 views
Serial port data plotter in PyQt
I am rather new in GUI programming and multi-threading apps. It is just a serial port monitor which plot serial data via pyqtgraph. There are two curves on the ...
2
votes
1answer
62 views
Handle data sent back over serial by Arduino
I have a machine that is being controlled by an Arduino. If I send the machine the command '9' it will send back JSON with some sensor temperatures in the format ...
0
votes
1answer
51 views
Basic GNU/Linux C++ serial I/O class
I have wrote a small C++ class that provides some basic serial I/O functionality (it uses the standard GNU/Linux API).
At this stage is working fine, before adding new functionality I want to get ...
4
votes
2answers
276 views
Simple meter simulator
I've created a simple python meter simulator which connects to a serial port (in my case COM1) listens on the serial port and takes actions based on what it ...
2
votes
2answers
435 views
C# SerialPort implementation
I'm writing a C# WPF project built with a MVVM pattern.
This software is written to use a medical diagnostic device, so in our planning it will be certified IEC 62304. Since I've been mainly writing ...
3
votes
0answers
51 views
Atmega328 watchdog, sleep and external interrupts
I have a customised Arduino board that will be connected to a battery and never power reset (it needs to be very reliable and cope with code hangs).
The board will always be put to sleep when not in ...
2
votes
0answers
47 views
Fetching a weather report on an Arduino from a web service
I'm writing some code which is basically supposed to http get some information from my own website and parse it, which (finally) works. However, when I compile the code, it shows this:
Sketch uses ...
1
vote
1answer
158 views
Modbus connection over TCP and Serial port
I want to improve my code. In this code I don't like my constructor, but without it I keep getting an error while trying to connect NullPointerException.
...
2
votes
1answer
87 views
RPi script to periodically collect data from Arduino through serial port
I'm not used to Python.
The script opens serial communications with an Arduino unit and send commands to and receives information from the Arduino. It is intended to run indefinitely until the system ...
7
votes
1answer
258 views
Verilog UART Transmitter
This is one of the first Verilog programs I have written. I have a Xilinx Artix-7 FPGA card. Right now I just have it transmitting an "X" every second. It works and I can see the result in my serial ...
2
votes
0answers
155 views
FUTABA SBUS serial communication in C++
I would like to reimplement the current Futaba SBUS protocol in ArduPilot for Navio+. It seems to be a relatively expensive protocol, so I changed the code from an existing git project and to make it ...
3
votes
2answers
1k views
Find a serial port device through WMI (windows management instrumentation)
The idea here is to be able to find a USB serial port device connected during runtime, thus not knowing its port number, and use it in the application to retrieve information from the device.
...
2
votes
1answer
78 views
Arduino serial data input output
I have created an Arduino sketch that I am using to send and receive data via serial. It works pretty well and doesn't seem go wrong as long as the correct formats are received. Is there anything I ...
4
votes
1answer
185 views
Controlling motors using USB serial connection from Raspberry Pi to Arduino
I am working on building an RC car/robot with Raspberry Pi and Arduino. I connected Arduino to Raspberry Pi using USB and send serial commands with python. I haven't done much programming with ...
5
votes
1answer
280 views
Robot arm manipulation library
I have created a DLL library that controls an robotic arm. Could you tell me if my design is correct? The robot communicates over serial port. The code works but I would like to receive a feedback ...
-3
votes
1answer
78 views
Read from Serial Port in C++ is unstable [closed]
I have a serial device (RS232) from which I am requesting (binary) data.
This interface answers with a sequence of 5 bytes, or 17 bytes when it has some new data.
I figured out, that I have to turn ...
5
votes
1answer
89 views
Writing a class to hold Arduino Properties for an Arduino I2C Debugger
I have this class which mostly holds a bunch of properties and their setters. I also have wrappers for some functions of another module. Here is the class:
...
1
vote
2answers
242 views
Serial-data read buffer handling
This is a follow-up to yesterday's codereview-question about reading serial data and parsing it.
The code below is run into a seperate thread looped endlessly.
Currently I track the position in my <...
4
votes
2answers
2k views
Read binary serial data and parse integers
I'm reading serial data in binary format from a stream, and I'm not happy with how I extract the data because it takes so much operations to extract the binary data from a simple line of binary data.
...
5
votes
1answer
147 views
Dynamic length binary data parsing
I am currently writing code for a UART communication in my firmware. I am getting an interrupt every byte received (meaning I don't get a chunk of data, 1 byte at a time but, in the sample below I ...
2
votes
2answers
251 views
Serial port write buffer
I'm writing to some serial comm port with specific bytes set into buffer. My protocol for write buffer is written below. Platform is Windows and IDE is Visual C++.
Byte 0 will have message type ...
5
votes
2answers
842 views
Open a comm port and send an ASCII string
This is my first ever project and first GUI. I have finished it (with help from Stack Overflow) and it works but is very slow. Can anyone suggest improvements for speed, best practices or usability.?
...
6
votes
1answer
3k views
Async SerialPort Wrapper
I've been working with the SerialPort class for a while, trying to figure out the best way to work with it, and especially adding support for Async-Await in C#. I ...
1
vote
1answer
80 views
Reading HTTP response from UART
I'm using a Telit GE864-GPS modem, which runs a dialect of Python 1.5.2. The Python module has access to the modem using a buffered UART, which may still be receiving when reading starts. The ...
5
votes
1answer
932 views
Serial port for Node.js
I am trying to create a class for serial port using Node.js, but I want to know if there is a better way to write my data class code.
In my sample code below, in the ...
3
votes
1answer
213 views
Python lookup table
I'm trying to design a protocol for sending/receiving serial data.
The basic plan is to allow for text data to be entered in the command prompt, translate that to a hex string and send it out over ...
5
votes
1answer
2k views
Programming Principles - Reading/writing from/to a Mifare card
Consider the following class (I've stripped XML doc for the sake of simplicity), which does several and slightly different operations through a serial port to read/write from/to a Mifare card. It has ...
11
votes
1answer
348 views
Door-opener program
I've been working on a little project on an Arduino and I need some help with making the code more efficient / cleaner. I really don't like the three for loops and ...
1
vote
2answers
2k views
UDP server and JSON parser script
I am a Python beginner and wrote a script which should run on a Raspberry PI as a UDP server. It reads and writes to a serial device and has to process and forward JSON strings.
Because there is ...
5
votes
2answers
2k views
Handling serial port with select and local socket
I have another issue: I'm trying to handle connections made by local socket along with data from serial port. Here is my concept:
Serial port is opened and monitored by select
Local socket is opened ...
10
votes
5answers
27k views
Reading from a serial port
I'm receiving data from a serial port in C, using Serial Programming Guide for POSIX Operating Systems as a guide.
The data I receive should be always 10 bytes in length but I want to be sure that, ...
7
votes
2answers
651 views
Serial port library across different compilers
I'm writing a C++ library with MinGW (4.8.0, DW2, POSIX) compiler. But this library must be used by another compiler. I've read this post, so I've re-written the C++ library interface in this way:
<...
5
votes
1answer
2k views
SerialPort C# Class
Originally I submitted a question here: Better Approach to Using the C# SerialPort Class
I cleaned up my code a bit and rewrote a few things. I've had a number of problems along the way and I've ...
10
votes
4answers
54k views
SerialPort class for a library
I've been working a lot recently with SerialPort in C# and I've come up with the following class as part of a class library I'm working on for another program. My question is, are there any more ...
3
votes
1answer
123 views
Servo commands based on serial port input
Straight to the point: Can you give me pointers on how to make this code more maintainable? In the future, I want to add more more things to this, but first it should be easy to maintain/read. Should ...
4
votes
1answer
306 views
Responding to serial input
This code for the Raspberry Pi board waits for serial input then plays an arrow with a sound and message. I'd like any constructive comments or suggestions.
...
3
votes
2answers
723 views
Serial port communication app
This code connects to COM 3 which has a broadband card and sends a command that returns the RSSI value. I use this program to see patterns in signal strength in certain areas.
...