![]() ![]() If (event.getEventType() = SerialPortEvent. Public void serialEvent(SerialPortEvent event) Here is the part of the code that is giving me problems: static int baudrate = 9600, I've been messing with various things but I haven't been able to fix the problem. I'm thinking it's a timing problem, because when I manually go through the code using the debugger, the result string is always what it should be: one 20 byte string. Copy comm.jar from commapi/ to the /lib or /lib directory.This gigantic method also contains a lot of duplication, for example the. The output of my Java program may look something like: Number of Bytes: 15 Download the Solaris version of Java Communication API. Mock the TwoWaySerialComm object, so that there is no real communication with. ![]() If the string is long (>10 bytes or so) the output will get broken up. Unfortunatly Serial-Comm suffers from two problems that I can't overcome: 1) It cannot give an up to date list of COM ports, e.g. My Java program should print the number of bytes that have been read and then print out the contents. So far I've tried RXTX and Serial-Comm, both of them are very good, RXTX has tons of functionality, Serial-Comm is very light, easy to use and platform independent. The code is based on the Java SimpleRead.Java found here.Ĭurrently the Arduino simply prints out a string when it starts up. The Arduino is actually connected to the PC using an FTDI cable. I'm trying to communicate between my PC (Windows 7 using Netbeans and RXTX) with an Arduino Pro, using the serial port. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |