serial-communication

how to write data row wise in serial communication

偶尔善良 提交于 2019-12-13 02:43:38
问题 i am creating a binary image using processing IDE. and send this binary value of image to arduino through serial communication. image is in binary form and serial communication is working. but in this code int value of i and String value of s in serial communication write value from 0 ->10000; but i want to send row wise value of image. import processing.serial.*; Serial myPort; PImage img; PImage img1; PrintWriter output; String s; int i,j; void setup() { img = loadImage("vl.png"); size(100

Worker threads with shared resources in Qt application

╄→尐↘猪︶ㄣ 提交于 2019-12-13 00:24:00
问题 I am working on a Qt application which involves serial communication with one or multiple devices. There are different procedures that can be executed simulteanously and each procedure may send one or unknown number of commands to a device and may receive data in response. To make it more clear, here is a graphical illustration of the scenario: Clicking on a button triggers the execution of the corresponding procedure. So two or more different procedures may be running at the same time when

Send data from android to connected Usb storage device in Usb Host Mode

a 夏天 提交于 2019-12-12 13:04:00
问题 In my application am using USB host mode which gives the information about connected USB mass storage device say Usb Flash Drive in my use case.Now I need to create a file on the connected flash drive and save some data in the file. So far I have found is connecting to the device as below, MainActivity.java public class MainActivity extends AppCompatActivity { private static final String TAG = MainActivity.class.getSimpleName(); private Button mCheckForDevice; private TextView mDeviceInfo;

Matlab serial Communication with Watlow F4 via Modbus RTU

核能气质少年 提交于 2019-12-12 06:02:11
问题 I am trying to build a communication between Matlab and a Watlow F4 temperature controller via Modbus RTU. My code looks like this so far: obj = serial('COM4'); fopen(obj); set(obj, 'BaudRate', 9600); set(obj, 'Terminator', 'CR'); set(obj, 'Timeout', 100); set(obj, 'InputBufferSize', 3000); now I am trying to read register 100. The address of the controller is 1. fwrite(obj, [1 3 00 100 0 1 197 213]); fread(obj, 7); but then the following error occurs: Warning: Unsuccessful read: The

Serial communication between pc and arduino via RS232 using c++

 ̄綄美尐妖づ 提交于 2019-12-11 11:41:09
问题 I am trying to communicate with my arduino duemilanove via an RS232 cord. I simply want to be able to send a byte (or char) to my arduino from a desktop application. The Arduino is plugging into USB COM5 on my computer. I have the RS232 plugged into COM1, and then I have pins 2 3 and 5 on the other end of the RS232 connected to arduino pins TX, RX, and GND, respectively. I found a serial comm class for c++ at the following link: http://playground.arduino.cc/Interfacing/CPPWindows I have added

Unusual pattern of data corruption over serial port

扶醉桌前 提交于 2019-12-11 09:34:25
问题 I'm testing my application's receipt of data over a serial port by sending data from Windows HyperTerminal and this mostly works. For example if I send : The Quick Brown Fox I receive : The Quick Brown Fox However, if I send : UUUUUUUUUUU I receive UUÕUÕUÕUÕUÕ or if I send : aaaaaaaaaaa I receive : aaáaáaáaáaá so for any repeated character string longer than 2, then the 3rd, 5th, 7th etc. characters are corrupted by having their high bit set. The serial port settings on both machines are

Receive and send data from arduino to c# and vice versa

不羁岁月 提交于 2019-12-11 09:18:14
问题 first of all I started using c# yesterday morning so I apologize for potential numb questions. So far I wrote the following code. I'm able to send data from c# to arduino which seems to be working fine. Now i would like to receive data from arduino, through serial.print, at the same time and display it in a box (ListBox?). How could add this to the code? I would be thankful for any input, tips and ideas. namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() {

LUA Programming ,ESP8266 NODEMCU Serial communication

南笙酒味 提交于 2019-12-11 05:58:17
问题 I am trying to send data over the serial port of the ESP8266 12E NODE MCU dev kit to an arduino serial port. I've having a hard time trying to find an example of the syntax used and I tried using serial.print() via the arduino to send data and it works but I'm unsure how to accomplish this in Lua. Any help is appreciated I can get the SSID and Password form arduino INIT.lua SSID = "XXXX" Password = "XXXX" wifi.setmode(wifi.STATION) wifi.sta.config(SSID,Password) -- Replace with your AP Name

QSerial error communicating with Arduino

倾然丶 夕夏残阳落幕 提交于 2019-12-11 05:38:28
问题 I wrote a simple program to use Qt (version 5.5 built from source for Visual Studio 2013 following this guide) to comunicate with Arduino. Here is a simple firmware which read from the serial and after 10 seconds prints "1" back: void setup() { Serial.begin(9600); //Open Serial connection for debugging } void loop() { if (Serial.available()) { char user_input = Serial.read(); if (user_input == '1') { delay(10000); Serial.print('1'); } } Here is the Qt program which send "1" on serial when I

How to form String Using pixel Array and read all characters value of array

谁说胖子不能爱 提交于 2019-12-11 04:18:12
问题 I am Creating a binary image from processing ide. i want to use pixel array as a string . when i convert this pixel array to string i can't read String characters. every time i get an error. array index of bound. please help to out of this problem for(int y = 0; y < img.height; y++) { for(int x=0; x < img.width; x++) { int i = x+y*img.width; String s = str(i); int c = s.charAt(1); print(c); } } when i run this code in processing software i get an error in console that String Index out of