We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Can anyone tell me how to assert a serial "break" in processing? I did some searching, I dont see it. I want to hold a break for 500mS then continue; Sample code would help.
Answers
FYI- here is definition if you don't know;
http://ltxfaq.custhelp.com/app/answers/detail/a_id/736/~/what-is-a-serial-break?
here is it being done in another compiler; https://stackoverflow.com/questions/1279478/rs-232-break-signal
It looks like in Java the flush() may initiate a 100mS break;
/** * Write/Send command to serial port and print the response. After writing * or sending command to the serial port, a 100ms break signal will be * invoked to ensure the result and then the response will be immediately * printed. * * @param cmd Command to be written/send * @return True if command was successfully written/sent, otherwise false */ public static boolean writeAndRead(String cmd) { final AtomicBoolean result = new AtomicBoolean(); if (isOpen()) { try { output.write(cmd.getBytes()); output.flush();
Really? I have stumped the forum? Do I win a prize of some sort?
That is a very technical question and I doubt you will find an answer here (Universe: prove me wrong). You could search for a solution in the Java world. If you find a way to do it in Java, then it should be possible to implement it in Processing, if that is what you want.
Kf
I cant believe this is considered highly technical, is standard feature in Real-term and Visual Studio; is part of serial protocol standard.
it appears Java uses this statement;
output.flush();
No idea how to convert to Processing (not SW engineer); I am surprised that no one has needed this, was used heavily in older serial equipment, but we are starting to see a comeback in some very recent ASICs...
OK, I have a terrible work-around unless someone has better idea; I am running at 460800, I close port, open as 300 baud, send 0x00, close port, open again as 460800, sent fetch string. Seems to work but really slow.
ANy other ideas? I still cannot believe that break was not supported in Processing;