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

Black pill? #47

Closed
rewsenj opened this issue Sep 6, 2020 · 23 comments
Closed

Black pill? #47

rewsenj opened this issue Sep 6, 2020 · 23 comments
Labels
question Further information is requested

Comments

@rewsenj
Copy link

rewsenj commented Sep 6, 2020

Hi I wanted to know if you plan on making this compatible with the STM32 black pill?

@vostrenkov
Copy link
Member

Hi, it is compatible with any board with STM32F103.
I know there are some bluepills boards with STM32F4 chips, they are planned to be supported later for FFB version of the software

@vostrenkov vostrenkov added the question Further information is requested label Sep 6, 2020
@bayerla
Copy link

bayerla commented Sep 6, 2020

Working well !!
grafik

@rewsenj
Copy link
Author

rewsenj commented Sep 7, 2020

Ah yep, turns out I was being exceedingly dumb and neglected to click 'write config to device'... Thanks for the quick reply.

I have some other questions:

1: I've connected two different button matrices to the board but the software is reading them as one single matrix, is there any way to make it see them as separate matrices?

2: I've been struggling to connect a single button(as in one solitary button as opposed to a matrix) to the board using either vcc/btn gnd or btn gnd/btn vcc. whenever I press the button the indicator doesn't change to green. It's not a fault with the button, I checked.

3: I've been trying to connect a hall sensor but it doesn't seem to be working, when I wave a magnet around it nothing happens. The sensors are A1324LUA-T. I tried with and without a 47µF capacitor (maybe too large capacitance?) but got nothing. I tried with a pot and it worked fine. Looking back at the website it says it needs a 4.5~5.5V supply so I probably just answered my own question. do you think this is a viable solution?

Sorry I'm pretty new to this.

@vostrenkov
Copy link
Member

  1. No, only one matrix supported
  2. Show your pins config or upload your config file. Do you have dynamic HID enabled?
  3. Yes voltage is a possible reason. Try with 5 volts but you should use a voltage divider on signal to not exceed 3.3V on analog pin

@rewsenj
Copy link
Author

rewsenj commented Sep 7, 2020

Dynamic HID wasn't enabled, so I enabled it, but it still doesn't work.

Screenshot (2)

@vostrenkov
Copy link
Member

I have it working with this config on v1.6.2b2.
Make sure you connect buttons right - in case of Button_VCC it should short pin to 3.3V or in case of Button_GND to GND

@rewsenj
Copy link
Author

rewsenj commented Sep 7, 2020

ah yep, the button is working now thx

It says here that the serial pins are 5v tolerant so is it fine to connect them without a divider (a3 and a4)?

@vostrenkov
Copy link
Member

The picture also shows that a0-a7 pins are not 5V tolerant.
Also if you will get more than 3.3V on axis input it will be counted as maximum value. So you can connect sensor supply to 5V but you have to make sure its output will fit 0 - 3.3V range

@rewsenj
Copy link
Author

rewsenj commented Sep 7, 2020

I'll get some Bidirectional LLCs

@vostrenkov
Copy link
Member

Logic levels converters won't fit if you need analog input because they have logic output. Easiest way is to use voltage divider with 2 resistors

@rewsenj
Copy link
Author

rewsenj commented Sep 7, 2020

I'll get resistors then.
I only have 10uF capacitors, is that too high or might they work?

@vostrenkov
Copy link
Member

10uF between supply and gnd should be fine

@rewsenj
Copy link
Author

rewsenj commented Sep 9, 2020

haha it works! right now i'm using 1k and 2k resistors but I can go higher (up to 100k and 200k). what would you recommend?

@vostrenkov
Copy link
Member

I'd recommend to stay in 10K - 100K range

@rewsenj
Copy link
Author

rewsenj commented Sep 20, 2020

Ok, I've managed to get it working. Mostly. The axis are connecting to the computer just fine but it doesn't seem to register the button presses (while freejoy configurator does). Any idea why?

@vostrenkov
Copy link
Member

Have you done logic buttons setting according to wiki?

@rewsenj
Copy link
Author

rewsenj commented Sep 21, 2020

I've rewired it so there is only one matrix but now it's doing this:
Screenshot 2020-09-21 141252
Screenshot 2020-09-21 141339

When I look at it in game controller it doesnt read any button presses exept when I press button 1 (lefthat1) where it reads it as all buttons being pressed

@vostrenkov
Copy link
Member

This is exactly what it should do with configuration on your pic.
On buttons tab you should map your physical buttons (left part of the screen) to your logical buttons (right part of the screen). Logical buttons is what your game read, physical buttons is what you have connected to the controller, so phy.btns work as source for log.btns
Now you set all your logical buttons mapped to physical button 1, so all them triggered when you press phy.btn1

@rewsenj
Copy link
Author

rewsenj commented Sep 21, 2020

Oh, it all makes sense now. Everything is working. Thank you so much for your help, I wouldn't have gotten this far without it.

@rewsenj rewsenj closed this as completed Sep 21, 2020
@pierre-vo
Copy link

@rewsenj does your black pill have a STM32F4 or STM32F103?

@makermindlane
Copy link

@vostrenkov I'd love to help bring support for stm32f4. Would be tremendous help if i could get a headstart or information about project architecture. :)

@vostrenkov
Copy link
Member

@vostrenkov I'd love to help bring support for stm32f4. Would be tremendous help if i could get a headstart or information about project architecture. :)

Work on porting to F4 is in progress. I believe it will be ready quite soon

@Monkeyja
Copy link

I want to know you have plans for implement ffb function or not 😅

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

No branches or pull requests

6 participants