Open jcd83a opened 5 years ago
Hi, you have to make quite some adjustments. Follow these instruction: https://www.allaboutcircuits.com/projects/communicate-with-your-arduino-through-android/ You're AndroidManifest.xml must be correct and you need a device_filter.xml (with the correct Arduino). There's lot of information available, just search for it.
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!