Arduino 到 Android – 使用 ADK 打开和关闭 LED [英] Arduino to Android – Turning an LED On and Off using ADK

查看:21
本文介绍了Arduino 到 Android – 使用 ADK 打开和关闭 LED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我指的是这个 用于将 Android 与 Arduino 板通信的示例.我有带 USB 扩展板和 Android 手机的 freeduino uno 板(micromax A110 (4.1.1)、sony xperia P (4.0.6) 和 samsumg core (4.1.2)).我已经从这里下载了 USB_Host_Shield_2.0.我正在编译草图并成功上传.但是,无法在freeduino uno board 和Android 手机之间建立通信.我正在尝试使用 freduino uno 板的 PIN 13 使 LED 闪烁,但它不起作用.将 Android 手机连接到 freeduino 板后,我在串行监视器上获得输出.

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

如果我将 Android 手机(v4.0.3)与 freeduino 板连接,我在串行监视器上遇到以下错误

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

提前谢谢你..

推荐答案

好的,可能是一些事情.对于这个问题,在arduino板上按几次重置按钮可能会有所帮助,然后再试一次.此外,当您连接屏蔽时,请尝试将引脚 d7 连接到 arduino 板上的复位引脚.如果这不能解决问题,那么您的 USB 防护板可能有问题,但也许其他人有更好的答案,如果这有帮助,请告诉我!

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!

这篇关于Arduino 到 Android – 使用 ADK 打开和关闭 LED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆