For an project I'd like to use the HID capabilities of the R4 WIFI. I am however unsure if the R4 supports being an HID/USB host;
I'd like to connect a controller or keyboard to the R4, and read the key/button presses using USB. In the past managed to do this using an USB host shield and a Arduino MEGA2560; This is working perfectly, but I'd like to upgrade the project, using the new R4 WIFI.
I am aware that i can connect the R4 to an PC, so it will recognize it as keyboard/mouse. but this is not what i am looking for.
Unfortunately the libraries for USB hosting shield are not yet available for the R4, or not compatible at least.
Thanks for the documentation, but it is unfortunately not the solution to the problem I am having/ the project I am trying to attempt:
I want to connect a controller to the Arduino, and use the inputs of the controller to toggle lets say an output, or translate joystick movement to an analog value.
The documentation only shows how to connect the Arduino as an "keyboard/mouse". but this is not something I am looking for. Thanks for the documents though!
Thanks! it seems my old code is now able to compile and upload once again, I however am having problems with it:
I keep getting the message in the serial monitor "OSC did not start." this also happens with the PS4 and XBOX sketches, so I suspect there might still be an issue with the library, as my code is still working on my Arduino Mega. (maybe it has something to do with the R4 WIFI? as I saw the sketches were tested on a Minima)
Curious, I just ran the PS4BT sketch on the WiFI board and it paired and ran no issues.
If I run the qc sketch:
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K................ SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue...
GPIO test passed.
PLL test. 100 chip resets will be performed
Resetting oscillator
Reset number 0 Time to stabilize - 406 cycles
Reset number 1 Time to stabilize - 406 cycles
Reset number 2 Time to stabilize - 406 cycles
Reset number 3 Time to stabilize - 406 cycles
Reset number 4 Time to stabilize - 406 cycles
Reset number 5 Time to stabilize - 406 cycles
Reset number 6 Time to stabilize - 406 cycles
Reset number 7 Time to stabilize - 406 cycles
Reset number 8 Time to stabilize - 406 cycles
Reset number 9 Time to stabilize - 406 cycles
Reset number 10 Time to stabilize - 406 cycles
Reset number 11 Time to stabilize - 406 cycles
Reset number 12 Time to stabilize - 406 cycles
....
...
Reset number 98 Time to stabilize - 406 cycles
Reset number 99 Time to stabilize - 406 cycles
Checking USB device communication.
Reset complete. Waiting for the first SOF...
Getting device descriptor
Descriptor Length: 12
Descriptor type: 01
USB version: 0200
Device class: FF
Device Subclass: 01
Device Protocol: 01
Max.packet size: 40
Vendor ID: 0A5C
Product ID: 21E8
Revision ID: 0112
Mfg.string index: 01
Prod.string index: 02
Serial number index: 03
Number of conf.: 01
All tests passed. Press RESET to restart test
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision invalid. Value returned: 09
Unrecoverable error - test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test
when I look at the one I have, and some shields from China/Ali-express, they are looking the same. maybe that is why I keep running into the "Die revision" error?
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K................ SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue...
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision invalid. Value returned: 00
Unrecoverable error - test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test
Now this one does not have the bottom ins like the other one does. Wonder if that makes a difference...
I always had some issues getting them to work with Teensy...