FreeJoy-Team / FreeJoy

STM32F103 USB HID game device controller with flexible configuration
GNU General Public License v3.0
761 stars 143 forks source link

Run an LCD as well as the joystick? #96

Open gazz29 opened 3 years ago

gazz29 commented 3 years ago

Just a Question not an issue,

I'm building a bus simulator, and have a few items that have LCD's in them, a program extracts the data from the bus sim and sends it as a string on the serial port, and ATM i basically have 2 boards inside each devise, one to run the LCD, and one to run the keypads which are joystick buttons.

I was wondering if it's possible to run these 2 functions on one board? i have the buttons on a matrix so only use a fraction of the free pins on the stm32 blackpill boards i am using.

I have been using arduino uno's and pro-micros so far for the LCD's, and i know i could use a STM32 board programed with the arduino IDE.

Just wondering if it was possible to do this, i have a feeling due to needing to use the same usb for serial and HID out it's not possible.

vostrenkov commented 3 years ago

Hi, it is possible for sure. If you need both serial and HID over same USB you just need to setup composite usb device CDC + HID. There are a lot of code for STM32 for this including official ST examples in USB library package