How to Arduino Mega ADK & Android tab

Hi,

I want to use my android tab as secundary display (i'm already using a glcd) to print the serial data on.
There are some tutorials about bluetooth, but none about using the usb host interface.
Can someone please help me?

Tutorials, examples, tips?

Thanks

You might want to look at the Android Communicator app (https://play.google.com/store/apps/details?id=com.primavera.arduino.listener&hl=en).

For more advanced usage, look at the Android Commander app (http://anettosoftware.co.uk/ac.php).

Thanks!

I allready had those apps installed, but that's not what i need.

In my arduino sketch i have some values (receiving via UDP) that are now showing on my GLCD. there's a little graph showing also.

I'm searching for a way to display the same values (and the graph if possible) on my Android tablet using the mega adk usb host interface. Like using my tablet as a GLCD.

Is this thread of any use: Arduino Usb Android Display - Exhibition / Gallery - Arduino Forum?

Martin.

thnx,

I've been testing a lot, and i've found a nice tutorial. now i still have some questions.

code from android:

private static final byte COMMAND_TEXT = 0xF;
	private static final byte TARGET_DEFAULT = 0xf;

	private TextView textView;
	private TextView textV;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		mUsbManager = UsbManager.getInstance(this);
		mPermissionIntent = PendingIntent.getBroadcast(this, 0, new Intent(
				ACTION_USB_PERMISSION), 0);
		IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION);
		filter.addAction(UsbManager.ACTION_USB_ACCESSORY_DETACHED);
		registerReceiver(mUsbReceiver, filter);

		setContentView(R.layout.main);
		textView = (TextView) findViewById(R.id.textView);
		textView = (TextView) findViewById(R.id.textView1); // -->> this is the textview i like to add in my project
	}

textView = (TextView) findViewById(R.id.textView1); // -->> this is the textview i like to add in my project

arduino "hello world sketch"

#include <Max3421e.h>
#include <Usb.h>
#include <AndroidAccessory.h>
#define ARRAY_SIZE 25
#define COMMAND_TEXT 0xF
#define TARGET_DEFAULT 0xF

#define COMMAND_TEXT 0xa
#define TARGET_DEFAULT 0xa

AndroidAccessory acc("Manufacturer", "Model", "Description",
"Version", "URI", "Serial");
char hello[ARRAY_SIZE] = {'H','e','l','l','o',' ',
'W','o','r','l','d',' ', 'f', 'r', 'o', 'm', ' ',
'A', 'r', 'd', 'u', 'i', 'n', 'o', '!'};
byte rcvmsg[255];
byte sntmsg[3 + ARRAY_SIZE];
void setup() {
Serial.begin(9600);
acc.begin();
}
void loop() {
if (acc.isConnected()) {
//read the sent text message into the byte array
//int len = acc.read(rcvmsg, sizeof(rcvmsg), 1);
//if (len > 0) {
if (rcvmsg[0] == COMMAND_TEXT) {
if (rcvmsg[1] == TARGET_DEFAULT){
//get the textLength from the checksum byte
byte textLength = rcvmsg[2];
int textEndIndex = 3 + textLength;
//print each character to the serial output
for(int x = 3; x < textEndIndex; x++) {
Serial.print((char)rcvmsg[x]);
delay(250);
}
Serial.println();
delay(250);
}
}
}
sntmsg[0] = COMMAND_TEXT;
sntmsg[1] = TARGET_DEFAULT;
sntmsg[2] = ARRAY_SIZE;
for(int x = 0; x < ARRAY_SIZE; x++) {
 54;
sntmsg[3 + x] = hello[x];
}
acc.write(sntmsg, 3 + ARRAY_SIZE); 

delay(250);
}
//}

how do i do this?
I've added the textview on my android app.
how do i send a second string from my android to the correct textview in android?

Thanks,

Chris