Android Mode - Serial Communication - Andruino

edited March 10 in Android Mode

Hi, nice to meet you.

I want (Arduino) ------- (Smartphone) Serial connection.

Processing 3.2.1. Android Mode 3.0.1

> API 6.0


import*; //ANDROID

Serial myPort;      
String inString=""; 

void setup() {

  myPort = new Serial(this, Serial.list(this)[0], 38400); 

//===========INCOMING DATA FROM THERMOSTAT=============
void serialEvent(Serial myPort) { 

  try {
    inString = myPort.readString();

  catch(RuntimeException e) {



====================================================================== **Error msg : **

Processing - Android USB Serial Error.



  • What am I doing wrong?

    Let me know what went wrong. Help.

  • I've never used direct otg usb connection, because my kitkat device didn't support it. (only 5.1 and above.) , I only use bluetooth. But ofcourse you are using the same boudrate 38400 in your ino sketch? How do you know that the port really is the the first [0]?

Sign In or Register to comment.