serial-port

Arduino code to write and send at the same time simultaneously

余生长醉 提交于 2019-12-14 02:46:00
问题 I am working a graphical blocks for Scilab (software similar to MATLAB) simulation environment. There should be blocks called AI (analogue input), AO, DO. Also, there will be two programs: 1) on the side of Scilab, one which sends and receives data; 2) on the side of Arduino, one which sends and receives data. Right now I am working on Arduino side code. It, the code, should read voltage values from 6 inputs and sends them to Scilab via serial and simultaneously write 1/0 to its outputs when

RFID Serial Port Time Out When Reading Data

耗尽温柔 提交于 2019-12-14 02:30:02
问题 thanks for taking the time to look at my issue! I have a Texas Instruments S4100 RFID scanner. I am attempting to simply read the ID of the tags I swipe over the scanner with a C++ console app. I've been pulling my hair out since this is the first time I've ever worked with serial ports. I found out quite a bit about the issue. I first used the createfile function and then the ReadFile function. I am extremely confident I opened the port correctly as the functions returned true. And when I

Serial port programming VB6 via Win32 API

耗尽温柔 提交于 2019-12-14 02:28:21
问题 I am interacting with a bill acceptor connected via serial in VB6 using the MSComm control. We're having some communication issues, and I have been tasked with using the Win32 API directly to interact with the serial port. I'm not quite sure where to begin. Any links, articles, or books would be greatly appreciated. 回答1: Serial Port Communication: perform serial port I/O without using the Microsoft Comm Control component 回答2: Richard Grier Book Visual Basic Programmer's guide to serial

C# can't open serial port from application launch successfully

不羁的心 提交于 2019-12-14 02:14:22
问题 So I have this port that I'm opening and saving the name of the port in a setting of my application. When I load the form it tries to open the port however fails to do so. Only after clicking on my "open port" button that has the EXACT same code does the port open. And then If I click my "close port" button and reopen the form it works! It automatically opens the port for me. However it's only if I'm fast enough. If I leave the application closed (and thus port closed) for say 10-15 seconds

Ubuntu RXTX does not recognize usb-serial device

房东的猫 提交于 2019-12-14 00:23:46
问题 I'm connecting a device with librxtx-java to Ubuntu. The code previously worked in 10.04, but in 12.04 it can't discover the usb-serial connected to the computer. java.util.Enumeration<CommPortIdentifier> portEnum = CommPortIdentifier.getPortIdentifiers(); while ( portEnum.hasMoreElements() ) { CommPortIdentifier portIdentifier = portEnum.nextElement(); System.out.println( portIdentifier.getName() + " - " + getPortTypeName(portIdentifier.getPortType()) ); } This section of the code never goes

'module' object has no attribute 'to_bytes' Python

只愿长相守 提交于 2019-12-13 21:11:04
问题 Please advise how I can cx-freeze my python program which uses serial : import serial import serial.tools.list_ports; print serial.tools.list_ports() Here's my setup.py import sys from cx_Freeze import setup, Executable setup( name = "My test program", version = "3.1", description = "My test", executables = [Executable("pystest.py", base = "Win32GUI")]) After I build using cx_freeze, this is my error : --------------------------- cx_Freeze: Python error in main script ------------------------

Windows 10 IOT serial - Working on RP2 but read serial data incomplete

浪子不回头ぞ 提交于 2019-12-13 19:13:45
问题 So I have been experimenting with the IOT serial sample and RP2 since the october release opened up the serial pins. Im using the windows iot serial sample. Have a few issues i cant figure out. The read data seems incomplete. I have an arduino outputting an analog input reading through the serial at 9600 baud. On the windows universial app, ill read one complete line then one incomplete line. For example: if the arduiono is outputting a value of "2.25", the app will read one line 2.25 then

Passing a Command to a Comm Port Using C#'s SerialPort Class

余生颓废 提交于 2019-12-13 16:57:15
问题 I'm currently trying to pass a specific command from an example test application written in VB6. In VB6 the command looks like: Comm1.Output = "UUT_SEND ""REMS\n"" " + Chr(10) Currently I'm trying to figure out how to pass that same data via C#'s SerialPort class. 回答1: sending stuff out the serialport is relatively straight forward.... var serialPort = new SerialPort("COM1", 9600); serialPort.Write("UUT_SEND \"REMS\\n\" \n"); To get any responses you will have to hook the DataReceived event.

Custom Baud Rate, redux

本小妞迷上赌 提交于 2019-12-13 16:32:31
问题 I am having exactly the problem detailed at Custom baud rate -- SetCommState() fails with baud=921600 but succeeds with baud=115200 -- albeit on Windows 7 64-bit and with a couple of other odd circumstances, as follows: 1) The port I'm talking to, is a USB-to-UART adapter from Silicon Labs, with their driver but (as I understand it; don't quote me) re-signed to identify itself as from my company (we redistribute it with our hardware product which requires it). The COM port appears in Device

PHP : Access to Bluetooth GPS via Serial Port (SPP) COM3

时间秒杀一切 提交于 2019-12-13 16:13:05
问题 how can I access to my Bluetooth GPS via Standard Serial Port (SPP) using PHP in Windows ? Thanks. 回答1: Here is a Windows extension for serial data: http://www.easyvitools.com/phpserial/index.html This class might be a bit more cross platform: http://www.phpclasses.org/package/3679-PHP-Communicate-with-a-serial-port.html Then I'd suggest reading about the NMEA protocol: http://en.wikipedia.org/wiki/NMEA_0183 来源: https://stackoverflow.com/questions/3691783/php-access-to-bluetooth-gps-via