Hi All,
I got this Arduino demo working with AndroidScript's USB Espruino example and a Galaxy S3, with the following sketch running on an Arduino Uno board.
These are the current default serial properties used by AndroidScript:
baud = 115200, databits = 8, stopbits = 1, parity = none
// Sample Arduino sketch for use with usb-serial-for-android.
// Prints an ever-increasing counter, and writes back anything
// it receives.
static int counter = 0;
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.print("Tick #");
Serial.print(counter++, DEC);
Serial.print("\n");
if (Serial.peek() != -1) {
Serial.print("Read: ");
do {
Serial.print((char) Serial.read());
} while (Serial.peek() != -1);
Serial.print("\n");
}
delay(1000);
}