Question about sending a sequence of bytes to serial port using Processing
in
Core Library Questions
•
1 year ago
Hi all,
I have a question about sending a sequence of bytes to the serial port. What is the right way to do this? I translated from this python sample code in order to control an USB device using Processing:
python sample code:
...
stop_now = "\x18\x00\x02\x00\xbd"
serial.write(stop_now)
...
translated to processing:
...
byte[] stop_now={byte(0x18),byte(0x00),byte(0x02),byte(0x00),byte(0xbd)};
myPort.write(strop_now);
...
Is this is a correct way to send byte sequences? My USB device didn't response at all... (I have the baud rate and parity set up correctly) any hints will be really helpful, thanks in advance!
I have a question about sending a sequence of bytes to the serial port. What is the right way to do this? I translated from this python sample code in order to control an USB device using Processing:
python sample code:
...
stop_now = "\x18\x00\x02\x00\xbd"
serial.write(stop_now)
...
translated to processing:
...
byte[] stop_now={byte(0x18),byte(0x00),byte(0x02),byte(0x00),byte(0xbd)};
myPort.write(strop_now);
...
Is this is a correct way to send byte sequences? My USB device didn't response at all... (I have the baud rate and parity set up correctly) any hints will be really helpful, thanks in advance!
1