Skip to content

Issue with app crashing when reading serial-related code. Help! #16

@jcd83a

Description

@jcd83a

Hi, I'm using an open source app called APDE to run processing on my android and I'm using this serial library to communicate between an arduino and the phone. I've really struggled to get this all working as I'm pretty new to it, so maybe I'm doing something obviously wrong. Here's some simplified code that is still making the app crash:

import io.inventit.processing.android.serial.;
import org.slf4j.
;
import org.slf4j.helpers.;
import com.hoho.android.usbserial.util.
;
import org.slf4j.spi.;
import com.hoho.android.usbserial.driver.
;
import com.hoho.android.usbserial.;
import org.slf4j.impl.
;

// add the serial library
Serial myPort; // the serial port to monitor
void setup() {
size(1000, 1750); // set the window size, size() also sets width and height variables
myPort = new Serial(this, Serial.list(this)[0], 9600); // define input port
myPort.clear(); // clear the port of any initial junk
}

void draw () {

}

I think the crash occurs at "myPort = new Serial(this, Serial.list(this)[0], 9600);" Does anyone have any advice? I'm using android version 8.0.0 and I believe I imported the libraries correctly into APDE. I also know I probably don't need a ll of those import, but I'm not competent enough to delete the unnecessary ones. If you need any more info, let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions