Arduino programmable µC with CANBus, HID

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ihab
 
Posts: 62
Joined: Tue May 17, 2016 5:20 pm

Arduino programmable µC with CANBus, HID

Post by ihab »

Hi folks,

I would like to create a peripheral for a Raspberry Pi that includes USB HID and CANBus. I would like this to be an easily available and integrated breakout board, since I need to whip up a quick prototype. So as I see it, the µC I use must be able to --

* Read GPIOs from a rotary encoder, and represent them as a USB HID interface, similarly to a Rotary Trinkey (https://www.adafruit.com/product/4964).

* Send and receive data via CAN RX/TX pins in conjunction with a CAN transceiver (https://www.adafruit.com/product/5708).

Here's what I've found --

* I am aware of a software CAN implementation for an RP2040 that goes up to 1 Mbps (https://github.com/KevinOConnor/can2040). I don't know if this is of high quality. Is it?

* I tried compiling a simple HID example for an RP2040 board, but the HID-Project headers (https://github.com/NicoHood/HID) tell me, "HID Project can only be used with an USB MCU."

* I know that ESP32 devices support CANBus and have what seems like a pretty decent API that is useable by simply calling the FreeRTOS CAN API from a *.ino file.

* I know that newer ESP32 devices support native USB (via assigned D+/D- pins) and can therefore theoretically act as USB HID peripherals, but I don't know how to program them to act as HID peripherals over that interface, especially since the programming is usually done via a USB/Serial link.

I would really like suggestions on what to use!

Ihab

User avatar
ihab
 
Posts: 62
Joined: Tue May 17, 2016 5:20 pm

Re: Arduino programmable µC with CANBus, HID

Post by ihab »

Quick update. I have started using an ESP32S3 dev kit and it works well (sorry if this is not an Adafruit product) --

https://docs.espressif.com/projects/esp ... itc-1.html

The dev kit explicitly has 2 USB ports -- one for programming, labeled "UART", and one connected to the microcontroller's native USB implementation, labeled "USB". I have been able to get a USB HID interface on the latter.

Ihab

User avatar
ihab
 
Posts: 62
Joined: Tue May 17, 2016 5:20 pm

Re: Arduino programmable µC with CANBus, HID

Post by ihab »

Oh, it *is* sold by Adafruit; see --

https://www.adafruit.com/search?q=esp32-s3-devkitc-1

Ihab

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”