cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie looking for help to make a Windows game device

Peirof
Associate II

Hi, its my first post

Let me introduce myself, my name is Manuel, I am from Spain (English is not my native language) and I have joined the forum looking for help.

 

My profile is that of a maker with very little programming experience (an AI maker). AI helped me a lot to make the programs

 

I’m migrating a project from Arduino to an STM32 Blackpill; I managed to get it working on Arduino.

Sim racing pedals

The pedals are a potentiometer (for the accelerator) and a loaded cell (for the brake).

 

Well, what I thought would be the hardest thing to do—getting the STM32 Blackpill to “read” those sensors—I’ve managed to do. I press buttons on the console and see the changes… but what was easy on Arduino—turning it into a game display for Windows—I’m not being able to do on the STM32… the libraries that Gemini recommends are either missing or don’t work…

 

I’m looking for help getting Windows to recognize my STM32 as a gaming device. I thought this part would be easier; the Blackpill model is supposed to communicate well with Windows via USB… but so far I haven’t been able to.

 

Can anyone recommend a resource to help me get Windows to recognize the STM32 Blackpill as a game device? Libraries, tutorials, anything.

 

Thanks in advance.

17 REPLIES 17

Yes, probably the main cause of issues is that CubeIDE will refuse to debug a clone chip.

We've also seen that Keil will recognise that the chip isn't an STM32, so won't debug it as an STM32.

 

The key point is that there are extra unknowns, which is Really Bad News for a beginner.

As an experienced user, you know how things should work, and how to get around these issues - but a beginner doesn't have that.

That's why I suggested that @Peirof should (at least) start with a genuine ST board - it's just a more comfortable experience all round for a beginner.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

@Andrew Neil wrote:

Yes, probably the main cause of issues is that CubeIDE will refuse to debug a clone chip.

We've also seen that Keil will recognise that the chip isn't an STM32, so won't debug it as an STM32.

 

It's not Keil, it's ST ST-Link driver for Keil. ;)

With Keil, there is an easy workaround - instead of ST-Link, use legal Chinese CMSIS-DAP or make your own, equally legal, from a BluePill.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

@gbm wrote:

It's not Keil, it's ST ST-Link driver for Keil. ;)

I'm not sure that's true.

Keil checks the chip ID, and sees that it doesn't match the target chip configured for the Project - just the same as if the project were configured for an STM32F103, but the target was some other genuine STM32.

Here's the thread:

https://community.st.com/t5/stm32-mcus-products/blue-pill-stm32f1-programs-ok-via-arduino-ide-but-not-keil-chip/td-p/667923

 

PS:

 


@gbm wrote:

there is an easy workaround .

Indeed. But, again, this is just unnecessary added noise, confusion and frustration for a beginner.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

From what I've read, the STM32 Blackpill boards don't support being used as gaming devices with VS Code and the Arduino IDE... From my research, I believe it's possible to program them using CubeIDE, but I've tried and it's way beyond my expertise. As I mentioned, I'm not a programmer by any means.

I'm considering two main options:
- Keep my STM32F411 in a drawer and buy an STM32F103C8T6, which I believe supports USB with the Arduino IDE and VS Code... (could someone confirm this?)
- Keep my STM32F411 in a drawer and buy one of the Nucleo boards you recommended, which also have USB support...

I think I'll go with the STM32F103C8T6 because for the price of one Nucleo board, I could get two or three STM32F103C8T6s.

Regarding whether the motherboard is original or a copy, I can't say much. I bought it on Amazon, thinking it was genuine, and I've just found out that the Blackpill model I bought is NOT. The problem and the advantage of STM32 motherboards is the fragmentation of the market. There are hundreds of models with the STM32 chip, and if you do a search on AliExpress... you'll be flooded with models and versions.

How can I know if the motherboard I'm buying is genuine? I bought this one not so much for the price, but for the delivery time; I had it at home the next day. I don't think I could buy a Ferrari with the money I save by buying a non-genuine motherboard.

Thanks to everyone for the comments.

PS: CubeIDE is surely very powerful, allowing you to configure the internal clocks, pins, everything... but for newbies like me, it's worse than a toothache.

I've built some simulation pedals, which are a rotary encoder and a load cell. These are connected to the Blackpill, and the Blackpill is connected to a PC running Windows 11. The PC should detect them (I managed to do this with an Arduino Leonardo) as a gaming device.

 

Hi,

1. show your board or link 

2. I have also "black pill" boards, F401 and F411 ; cpu's are genuine STM , as on most boards. 

3. The "board" doesn't have to be from STM, only the CPU on the board.

4. You have an st-link ?  Then try connect in CubeProgrammer and show, what its telling.

Then you know, it could/will work with the IDE ...debug... or there is a problem.

If you feel a post has answered your question, please click "Accept as Solution".

cameringo_20260109_193213.jpg

 V3.1 WeAct Studio

Regarding CubeIDE, since 2.0.0 it is only a teylored IDE, CubeMX is not anymore included in CubeIDE. I started half a year ago with a way more complex MCU (STM32H7RS), but even though it needs a bit of reading the docs and looking at examples, i can highly recommend it and you will save time in the long run.