Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Showing with 10 additions and 0 deletions.
  1. +10 −0 java/libraries/serial/src/processing/serial/Serial.java
View
10 java/libraries/serial/src/processing/serial/Serial.java
@@ -349,6 +349,16 @@ public String readString() {
}
+ public String readStringUntil(int inByte) {
+ byte temp[] = readBytesUntil(inByte);
+ if (temp == null) {
+ return null;
+ } else {
+ return new String(temp);
+ }
+ }
+
+
public void serialEvent(SerialPortEvent event) {
if (event.getEventType() == SerialPortEvent.RXCHAR) {
int toRead;

5 comments on commit d9768bc

@sspence65

added this function to existing 2.1 Serial.java. Still get "function readStringUntil(char) does not exist". Does this require a recompile?

@gohai
Collaborator

sspence65: yes

@Alexandreitsme

Hi, if that could help beginner like me, the file is path start by: processing-2.1/modes/java/libraries/serial/src/processing/serial/Serial.java

  • Like sspence65 mention we need to compile how do I can do that?
  • Last that may be the answer to my previous question, but what java editor you recommend me to use to do those kind of simple task?

Thanks

@gohai
Collaborator

@Alexandreitsme Please just revert to Processing 2.0.3 for the time being. This will be fixed with the next Processing release. Thanks.

@eric-brechemier

@Alexandreitsme To answer your questions:

  • to compile java, you need a java compiler (javac, which stands for java compiler, which is part of the Java Development Kit)
  • Eclipse is one of the recommended Integrated Development Environments (IDE) for java; it bundles a java text editor and java compiler, as well as debugging tools
Please sign in to comment.
Something went wrong with that request. Please try again.