Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code does not work! #1

Open
Alb3sw opened this issue Mar 15, 2024 · 1 comment
Open

Example code does not work! #1

Alb3sw opened this issue Mar 15, 2024 · 1 comment

Comments

@Alb3sw
Copy link

Alb3sw commented Mar 15, 2024

I use Arduino NANO Esp32 Board
I've selected COM3 port from Arduino Ide
I've installed dualsense library and suggested host shield 2.0 library

After Paste and verify the example code, the result is this;

In file included from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTD.h:22,
from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTHID.h:21,
from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/PS5BT.h:21,
from c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerBt.h:4,
from C:\Users\albes\AppData\Local\Temp.arduinoIDE-unsaved2024215-7660-1e0iqlm.6g6j\DualSenseControllerDemo\DualSenseControllerDemo.ino:45:
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/usbhid.h:145:9: error: 'USB' does not name a type
USB pUsb; // USB class instance pointer
^~~
In file included from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTD.h:22,
from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTHID.h:21,
from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/PS5BT.h:21,
from c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerBt.h:4,
from C:\Users\albes\AppData\Local\Temp.arduinoIDE-unsaved2024215-7660-1e0iqlm.6g6j\DualSenseControllerDemo\DualSenseControllerDemo.ino:45:
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/usbhid.h:165:19: error: expected ')' before '
' token
USBHID(USB pusb) : pUsb(pusb) {
~ ^~
)
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/usbhid.h:168:15: error: 'USB' does not name a type
const USB
GetUsb() {
^~~
In file included from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTHID.h:21,
from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/PS5BT.h:21,
from c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerBt.h:4,
from C:\Users\albes\AppData\Local\Temp.arduinoIDE-unsaved2024215-7660-1e0iqlm.6g6j\DualSenseControllerDemo\DualSenseControllerDemo.ino:45:
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTD.h:228:16: error: expected ')' before '' token
BTD(USB p);
~ ^~
)
In file included from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTHID.h:21,
from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/PS5BT.h:21,
from c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerBt.h:4,
from C:\Users\albes\AppData\Local\Temp.arduinoIDE-unsaved2024215-7660-1e0iqlm.6g6j\DualSenseControllerDemo\DualSenseControllerDemo.ino:45:
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTD.h:539:9: error: 'USB' does not name a type
USB pUsb;
^~~
In file included from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTHID.h:22,
from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/PS5BT.h:21,
from c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerBt.h:4,
from C:\Users\albes\AppData\Local\Temp.arduinoIDE-unsaved2024215-7660-1e0iqlm.6g6j\DualSenseControllerDemo\DualSenseControllerDemo.ino:45:
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/hidboot.h:222:20: error: expected ')' before '
' token
HIDBoot(USB p, bool bRptProtoEnable = false);
~ ^~
)
In file included from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/BTHID.h:22,
from c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/PS5BT.h:21,
from c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerBt.h:4,
from C:\Users\albes\AppData\Local\Temp.arduinoIDE-unsaved2024215-7660-1e0iqlm.6g6j\DualSenseControllerDemo\DualSenseControllerDemo.ino:45:
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/hidboot.h:256:32: error: expected constructor, destructor, or type conversion before '(' token
HIDBoot<BOOT_PROTOCOL>::HIDBoot(USB p, bool bRptProtoEnable/ = false
/) :
^
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/hidboot.h: In member function 'uint8_t HIDBoot<BOOT_PROTOCOL>::Init(uint8_t, uint8_t, bool)':
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/hidboot.h:299:33: error: 'pUsb' was not declared in this scope
AddressPool &addrPool = pUsb->GetAddressPool();
^~~~
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/hidboot.h: In member function 'uint8_t HIDBoot<BOOT_PROTOCOL>::Release()':
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/hidboot.h:565:9: error: 'pUsb' was not declared in this scope
pUsb->GetAddressPool().FreeAddress(bAddress);
^~~~
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/hidboot.h: In member function 'uint8_t HIDBoot<BOOT_PROTOCOL>::Poll()':
c:\Users\albes\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/hidboot.h:597:33: error: 'pUsb' was not declared in this scope
rcode = pUsb->inTransfer(bAddress, epInfo[epInterruptInIndex + i].epAddr, &read, buf);
^~~~
In file included from c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerBt.h:5,
from C:\Users\albes\AppData\Local\Temp.arduinoIDE-unsaved2024215-7660-1e0iqlm.6g6j\DualSenseControllerDemo\DualSenseControllerDemo.ino:45:
c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerCore.h: At global scope:
c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerCore.h:14:5: error: 'USB' does not name a type
USB
usbPtr_ = nullptr;
^~~
c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerCore.h:56:16: error: expected ')' before '
' token
USB* usbPtr,
^
)
c:\Users\albes\Documents\Arduino\libraries\DualSenseController\src/DualSenseControllerCore.h:55:37: note: to match this '('
explicit DualSenseControllerCore(
^

exit status 1

Compilation error: exit status 1

@einspunktnull
Copy link
Contributor

After some research I found out that the USB Host Shield Library 2.0, on which this library is based, unfortunately does not support the Arduino Nano ESP32 board. I tried to compile their example sketch USB Host Shield Library 2.0 > PS5USB and got the same error. Unfortunately there is not much I can do. Please ask the authors for making their library compatible with your board or try another ESP32 Board like this (This is no advertiesment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants