serial-communication

jSSC Not Sending Data to Arduino

半世苍凉 提交于 2019-12-23 02:01:40
问题 I have a problem with writing function of jSSC. My Arduino Uno board seems not getting data from my Java program. I have a stepper motor controlled by Arduino Uno board. I made a simple program that has 2 buttons. One is for CW rotation and the other is CCW rotation. CW button sends 'H' char and CCW button sends 'L' char. Now I have: I checked from Arduino IDE serial console my Arduino program works correct. When I send 'H' the motor turns CW and with 'L' the motor turns CCW. I made a program

C# console application talking to Arduino via Bluetooth

岁酱吖の 提交于 2019-12-21 06:03:35
问题 Not a whole lot to say here other than this doesn't work, and I have no idea why. The serial output on the Arduino is nothing. The output on the C# code goes down to waiting for a response and then nothing. The Bluetooth card LED on the Arduino goes green when I start the C# program so there is a connection being made. Just nothing else. Arduino Code #include <SoftwareSerial.h> //Software Serial Port #define RxD 8 // This is the pin that the Bluetooth (BT_TX) will transmit to the Arduino (RxD

Serial RS232 Communication Checksums?

不想你离开。 提交于 2019-12-20 07:15:13
问题 I am communicating with a servo via RS232 serial. The built-in functions that came with my servo are too slow (25 ms for a simple 54 byte message on a 57,600 baud port), so I am trying to write my own communication functions, however the built-in functions are not documented. I have used a port monitor to determine what information is being sent to the servo and I need help deciphering the results. I used the built-in functions to command the servo to "goto" incrementally increasing steps (1,

Change SerialPort's BaudRate while connection is open

廉价感情. 提交于 2019-12-19 17:39:06
问题 I am using SerialPort class to communicate with an external device. I start the communication at 300 Baud per second however after the initial "handshake" I have to switch to a Baud rate specified by the device (usually 9600 Bps). I have been unsuccessful in my attempts to continue communicating after I increase Baud rate however I am not sure why. That leads me to my question: What is the proper way of changing the Baud rate? Can it be done while the connection is open, or should I close the

Set DCB Fails When Attempting to Configure COM Port

强颜欢笑 提交于 2019-12-18 17:13:33
问题 I'm trying to write a C++ MFC application that uses the serial port (e.g. COM8). Every time I try to set the DCB it fails. If someone can point out what I'm doing wrong, I'd really appreciate it. DCB dcb = {0}; dcb.DCBlength = sizeof(DCB); port.Insert( 0, L"\\\\.\\" ); m_hComm = CreateFile( port, // Virtual COM port GENERIC_READ | GENERIC_WRITE, // Access: Read and write 0, // Share: No sharing NULL, // Security: None OPEN_EXISTING, // The COM port already exists. FILE_FLAG_OVERLAPPED, //

replicate Arduino's serial monitor on Scilab consol

蹲街弑〆低调 提交于 2019-12-18 07:23:41
问题 If I use the Arduino IDE's Serial monitor I can read the pair of comma separated values as below: I want to first replicate this behavior in SciLab terminal. I used the Serial Communication Toolbox: h = openserial(7, "9600,n,8,1") // open COM7 disp(readserial(h)) closeserial(h) which returns either empty or , 169 228, 179 228, 228, 205 228, 209 228, putting the disp(readserial(h)) in a while loop also doesn't help. Not only there are too many empty lines, if I stop the while loop it does not

Send a structure using UART [closed]

*爱你&永不变心* 提交于 2019-12-14 04:14:49
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I have a two boards: - Master board (M board) - Slave board (S board) M board shall send a request to S board and the latter shall answer. The answer of the slave is a struct: typedef struct{ uint8_t userID; uint8_t userPass; uint16_t userData; }UserTypeDef; UserTypeDef User;

Rs232 arduino issue

末鹿安然 提交于 2019-12-13 08:56:16
问题 I have a little confusing about arduino uno. I use Serial.print("hi") code then it "hi" appears on the serial monitor. I also use rs232/ttl converter which are connected pin 1 and 0 on the arduino properly. Then I realize that when serial.print("hi") working the data first is going through usb cable. But I want the data has to go through tx rx pins which are 1 and 0. But when I enter some data from serial monitor , rs232/ttl will work and some data will be sended ? I do not understand the

Python and arduino serial communication

我与影子孤独终老i 提交于 2019-12-13 06:26:45
问题 I have a arduino Uno connected to my laptop through USB. I am running WAMP webserver on windows 7. I have python 2.7 and py serial installed. I wrote a HTML where the buttons when clicked will invoke the led1.py (python script). The python script would communicate with the arduino to put on a led and then the user would press another button to putt off the Led. The buttons when pressed are invoking the python script, the led is getting on, but then the HTML page is giving an error: Internal

Problems opening and closing the mscomm port in vb6 when interfacing microcontroller

核能气质少年 提交于 2019-12-13 06:01:53
问题 the code is to get data from a microcontroller or any device from serial device using serial port,so i am having problem with port opening and getting data,am having this problem for last 20 days please kindly help me at the earliest :) Private Sub Command1_Click() MsgBox ("The port is open " & MSComm1.PortOpen) If (MSComm1.PortOpen = False) Then MSComm1.PortOpen = True End If Command1.Enabled = False Command2.Enabled = True End Sub Private Sub Command2_Click() If (MSComm1.PortOpen = True)