USB Library

Hello,
I am new with USB protocol and i need help, i need to comunicate my arduino with an USB device
The arduino will need to be the host so i need the USB Host shield, but then i am stuck because i dont know what to do.

There is no library to my device so i need to make one myself, on the documentation of the device they recommend is on the attachments.

Can someone post something like what would be the code ? or what should i do ?

Capturar.PNG

I have this sketch for USB keyboards, using USB Shield.
I hope to help you.

Regards, Bruno.

char leitora;
String acumulado = "";
#include <hidboot.h>
#include <usbhub.h>
#ifdef dobogusinclude
#include <spi4teensy3.h>
#include <SPI.h>
#endif

class KbdRptParser : public KeyboardReportParser
{
    void PrintKey(uint8_t mod, uint8_t key);

  protected:
    void OnKeyDown  (uint8_t mod, uint8_t key);
    void OnKeyPressed(uint8_t key);
};

void KbdRptParser::PrintKey(uint8_t m, uint8_t key)
{
  MODIFIERKEYS mod;
  *((uint8_t*)&mod) = m;
};

void KbdRptParser::OnKeyDown(uint8_t mod, uint8_t key)
{
  uint8_t c = OemToAscii(mod, key);
  if (c)
    OnKeyPressed(c);
}

void KbdRptParser::OnKeyPressed(uint8_t key)
{
  // If the ENTER key has been pressed, it goes to the next line
  if(key == 19)
  {
    Serial.print(acumulado);
    Serial.println("A");    
    acumulado="";
  }
  else
  {
    acumulado.concat((char)key);
  
  }
};

USB     Usb;
HIDBoot<USB_HID_PROTOCOL_KEYBOARD>    HidKeyboard(&Usb);

uint32_t next_time;

KbdRptParser Prs;




 void setup() {   

  Serial.begin(9600); 
  
  Serial.println("Use the USB keyboard...");

  if (Usb.Init() == -1)
    Serial.println("USB Host Shield not found !");
  delay( 200 );
  next_time = millis() + 5000;
  HidKeyboard.SetReportParser(0, (HIDReportParser*)&Prs);
}

  void loop () {
      Usb.Task();
 
}