Ks0155 keyestudio USB Host v1.5 shield: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 93: Line 93:


==Resources ==
==Resources ==
'''Download the PDF:'''<br>
https://drive.google.com/open?id=1VUlfeDcOpeqicqMlRbBBcrsO0lRVXP9I


'''Download the code:'''<br>
'''Download the libraries, code and the DemoKit APP:'''<br>
https://drive.google.com/open?id=18tH6hN7nRiHDJhyvDp0uGLGBJ0GqvmDB


'''Download the libraries:'''<br>
https://fs.keyestudio.com/KS0155
https://drive.google.com/open?id=1ARXS7q2lhEiykEva24em_GLnkHdzrxl5


'''Download the DemoKit APP:'''<br>
https://drive.google.com/open?id=14-jybsiV2DvRa3cxdCdfRdHZWf9HoN-7


<br>


<br>
==Get One Now ==
==Get One Now ==
*'''Official Website:'''  http://www.keyestudio.com/ks0155.html
*[https://www.keyestudio.com/free-shipping-keyestudio-usb-host-v15-shield-compatible-with-google-android-adk-support-uno-mega-for-arduino-p0299.html '''Official Website''' ]


*[https://www.aliexpress.com/store/product/Free-shipping-USB-host-shield-compatible-with-Google-Android-ADK-support-UNO-MEGA-for-arduino/1452162_32222489349.html?spm=2114.12010612.8148356.1.46a76568vpY61y  '''Shop on Aliexpress'''  ]
*[https://www.aliexpress.com/store/product/Free-shipping-USB-host-shield-compatible-with-Google-Android-ADK-support-UNO-MEGA-for-arduino/1452162_32222489349.html?spm=2114.12010612.8148356.1.46a76568vpY61y  '''Shop on Aliexpress'''  ]
Line 114: Line 108:
*[https://www.ebay.com/itm/132756363665 '''Shop on eBay''' ]
*[https://www.ebay.com/itm/132756363665 '''Shop on eBay''' ]


[[Category: Shield]]
 


[[Category: Shield]]
[[Category: Shield]]

Latest revision as of 14:59, 6 January 2021

Keyestudio USB Host v1.5 shield


Introduction

keyestudio USB Host shield V1.5 is an add-on board for Arduino USB Host. Directly plug it to Arduino board and it will allow Arduino to have USB Host function. Arduino with host function can communicate with USB devices, such as USB flash disk, keyboards, mouse, joysticks, digital cameras.
Among these functions, the most attractive one is supporting the connection of android phones to realize Google ADK function.
It enables your phone as a control terminal to control your robot or other devices. Meanwhile, it can display the collected data on your mobile terminal.


Specification

  • Supporting the Google Android ADK function
  • Compatible with UNO R3 and MEGA 2560 control board.
  • Supporting the Android system, provided with APP software ( at most Android 4.0.3 version)
  • Comes with a reset button
  • Realizing the USB Host function, enable to communicate with other USB devices and support the USB HUB function.
  • Onbaord comes with double-sided through-hole pad, welding the electronic elements and setting the prototype circuit.


thumb


Technical Details

  • Dimensions: 58mm x 57mm x 17mm
  • Weight: 18g


thumb


PINOUT


thumb


Test Code

Below is an example code.
Click here to download the libraries.
Click here to download the code
Or you can directly copy and paste the code below to Arduino IDE.

#include <Max3421e.h>
#include <Usb.h>
#include <AndroidAccessory.h>
#define LED 9
AndroidAccessory acc("Google, Inc.",
"DemoKit",
"DemoKit Arduino Board",
"1.0",
"http://www.android.com",
"0000000012345678");
void setup()
{
Serial.begin(115200);
Serial.print("\r\nStart");
acc.powerOn();
pinMode(LED, OUTPUT);
digitalWrite(LED, 0);
}
void loop()
{
byte msg[3];
if (acc.isConnected()) {
Serial.print("Accessory connected. ");
int len = acc.read(msg, sizeof(msg), 1);
Serial.print("Message length: ");
Serial.println(len, DEC);
if (len > 0) {
// assumes only one command per packet
if (msg[0] == 0x2) {
if (msg[1] == 0x0)
analogWrite(LED, msg[2]);
}
}
}
delay(100);
}


Code to Note:
1. Before compile the code, do remember to add the necessary libraries inside the libraries directory of Arduino IDE.
Download the libraries from below link:
https://drive.google.com/open?id=1ARXS7q2lhEiykEva24em_GLnkHdzrxl5
2. The test code is only compatible for lower Arduino 1.0 version IDE.


Example Use

Install the DemoKit APP on your Android phone( at most Android 4.0.3 version).
thumb

Stack the shield onto UNO R3 board and upload the code, connect an external LED. Then connect the shield to your phone using a micro USB cable.
thumb

Powered on, click the icon of DemoKit to enter the input interface, then click Out to enter the output interface.
When slide the Led1, the display data will be changed in the range of 0-255. The greater the value is, the brighter the external LED is.

thumb thumb thumb



Resources

Download the libraries, code and the DemoKit APP:

https://fs.keyestudio.com/KS0155



Get One Now