Arduino to Android – Turning an LED On and Off using ADK

旧街凉风 提交于 2019-12-07 04:34:30

问题


I am referring this example for communicating Android with Arduino board. I am having freeduino uno board with USB shield and Android phone(micromax A110 (4.1.1), sony xperia P (4.0.6) and samsumg core (4.1.2)). I have downloaded USB_Host_Shield_2.0 from here. I am compiling sketch and uploading successfully. but, unable to establish communication between freeduino uno board and Android phone. I am trying to blink LED using PIN 13 of freduino uno board but its not working. I am getting output on serial monitor after connecting Android phone to freeduino board.

ADK demo start
Waits for Android device get ready.
Waits for Android device get ready.
Waits for Android device get ready.
Waits for Android device get ready.
Waits for Android device get ready.

ADK Init
ADK Init
ADK protocol rev. 0002

swAcc:
ADK Init
getDevDescr 0D

ADK Init
getDevDescr 0D

ADK Init
getDevDescr 0D

If I am connecting Android phone(v4.0.3) with freeduino board i am getting below error on serial monitor

Device addressed... Requesting device descriptor.
found possible device. swithcing to serial mode
device supports protocol 1 or higher
Data packet error: D
Data packet error: D

Thank you in Advance..


回答1:


Okay, it could be a few things. For this problem, it might help you to press the reset button a couple of times on the arduino board, then try again. Also, when you connect the shield, try connecting pin d7 to the reset pin on the arduino board. If this doesn't solve it, then you likely have a problem with your usb shield, but maybe someone else has a better answer for you, let me know if this helps!



来源:https://stackoverflow.com/questions/19634930/arduino-to-android-turning-an-led-on-and-off-using-adk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!