USB Module USB HOST/HID with MAX3421E SPI Interface Output*5 Input*5

USB Module USB HOST/HID with MAX3421E SPI Interface Output*5 Input*5

  • R 809.43
    Unit price per 
  • Save R 809.43
Tax included.

SKU:

Description:

USB is a USB driver module, integrated MAX3421E which adds USB host or peripheral capability to any system with an SPI interface. Ever up for adding the standard USB features on your project? this M5 moudle is the perfect solution.

Series Protocol: SPI

Product Features:

  • 1x UAB stadard A port
  • 10x extended GPIO pins
  • extended 3v3, 5v & GND
  • Product Size: 4.2mm x 54.2mm x 12.8mm
  • Product weight: 14.5g

Package Included:

  • 1x M5Stack USB Module

Application:

  • USB keylogger
  • Read and write U disk using M5Core

EasyLoader

<blockquote style="box-sizing: border-box; font-size: 16px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-size-adjust: none; margin: 2em 0px; overflow: visible; padding: 1.5em; border-width: var(--blockquote-border-width, 0); border-style: var(--blockquote-border-style); border-color: var(--blockquote-border-color); border-radius: var(--blockquote-border-radius); background: var(--blockquote-background); color: rgb(33, 37, 41); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; quotes: &quot;

1.EasyLoader is a simple and fast program burner. Every product page in EasyLoader provides a product-related case program. It can be burned to the mas ter through simple steps, and a series of function verification can be performed.(Currently EasyLoader is only available for Windows OS)

2.After downloading the software, double-click to run the application, connect the M5 device to the computer via the data cable, select the port parameters, and click "Burn" to start burning.

3.The CP210X (USB driver) needs to be installed before the EasyLoader is burned. Click here to view the driver installation tutorial

Example:

To get complete code, please click here.

NOTE:

Before compile this example code, you need to download the corresponding USB library from here. Unzip and copy this library folder to Ardui no library pa th.( This is my pa thC:UsersDocumentsArdui nolibraries)

Download the example usb_m o u se.ino

Plug the USB m o u se into USB A port.

  • Hold down the left button to draw white lines.

  • Hold down the right button to draw green line.

  • Press the middle wheel button to clear the screen.

  #include <M5Stack.h>  #include <SPI.h>  #include <Usb.h>  #include <hiduniversal.h>  #include <hidboot.h>  #include <usbhub.h>  #include "M5Mou se.h"    // new objects  USB Usb;  USBHub  Hub(&Usb);  HIDBoot<USB_HID_PROTOCOL_M O U SE> HidMouse(&Usb);  MouseRptParser  Pr s;    // initialization  M5.begin();  Usb.Init();  HidMouse.SetReportParser(0,(HIDReportParser*)&Pr s);    // handle event coming from usb device  Usb.Task();  if(Usb.getUsbTaskState() == USB_STATE_RUNNING)  {    M o u se_Pointer(mou_px, mou_py);    mou_px = 0;    mou_py = 0;    /* left button pressed: draw white point */    if (mou_button == 1)      M5.Lcd.drawCircle(StaPotX, StaPotY, 1, WHITE);    /* right button pressed: draw green point */    if (mou_button == 2)      M5.Lcd.drawCircle(StaPotX, StaPotY, 1, GREEN);    /* middle button pressed: clear screen */    if (mou_button == 4)      M5.Lcd.fillScreen(BLACK);  }