-
Notifications
You must be signed in to change notification settings - Fork 14
Description
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!