0
votes

I have an Arduino-compatible ADK board with USB Host Shield.

(Specifically, it is the Seeeduino ADK Main Board at: http://www.seeedstudio.com/depot/seeeduino-adk-main-board-p-846.html. It is receiving external USB Power.)

I have a custom USB accessory connected to it, and I need to do something that should be simple for this forum's contributors.

My ultimate plan is to connect an Android 3.2 tablet or phone to the ADK board and tell it to send out a hex packet to my USB accessory. But right now, I need sample code for the Arduino firmware to send hex commands out to my USB accessory.

The packet breakdown is as follows:

STX   DAT1   DAT2   DAT3   DAT4   ETX   CHK

Name    Hex    Definition

STX    02h   Start of Text Data
DATx   --h   Text Data
ETX    03h   End of Text Data
CHK    --h   Checksum

Can someone point me to example firmware for my Arduino board to output this data packet to my attached USB Accessory?

2

2 Answers

0
votes

Closest thing I could find was the Arduino Serial Reference at: http://arduino.cc/en/Reference/Serial

Any other responses would be appreciated.

0
votes

Have you tried the standard Google ADK example? http://developer.android.com/guide/topics/usb/adk.html

From what I can see on the Seeeduino page you shouldn't have to do anything special. Once that's up and running you can modify the code to work with your message format.