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

SpeedyBeeF7 No led strip #7234

Closed
charizardavi opened this issue Jul 9, 2021 · 8 comments
Closed

SpeedyBeeF7 No led strip #7234

charizardavi opened this issue Jul 9, 2021 · 8 comments
Milestone

Comments

@charizardavi
Copy link

The Speedybee f7 does not have led strip support currently, is there any way to add it? I tried adding "#define USE_LED_STRIP" in target.h, got a build error relating to the led strips.

@MRC3742
Copy link

MRC3742 commented Aug 3, 2021

I don't own this board but I think you also need to define the CPU pin number that is hooked to the LED pad.

The target.c file lists the LED timer to be on the PB7 pin (if this is correct it should be connected to the LED pad)

DEF_TIM(TIM4, CH2, PB7, TIM_USE_LED | TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // LED/S6

So you need to add these lines to the target.h file after line 143 (just above the "FC Default Config" section)
// LEDSTRIP
#define USE_LED_STRIP
#define WS2811_PIN PB7

I've tested the code and it will build but I have no hardware to test?
If this works open a pull request to get it added to the target file.

Hope this helps - Rich

@charizardavi
Copy link
Author

Thanks Rich, will test this out

@stale
Copy link

stale bot commented Jan 9, 2022

This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help.
This issue / pull request will be closed if no further activity occurs within two weeks.

@stale stale bot added the Inactive label Jan 9, 2022
@DzikuVx DzikuVx removed the Inactive label Jan 9, 2022
@andreapede
Copy link
Contributor

andreapede commented Jan 14, 2022

Hi,
I'm testing the solution against the 4.0.0 but I'm little concerned about the correct pin addressing.

Actual target.c (src/main/target/SPEEDYBEEF7V2/target.c ) define PB0 as led pad
DEF_TIM(TIM8, CH2N, PB0, TIM_USE_LED, 0, 0), // LED

So the correct defintion of target.h should be PB7->PB0

// LEDSTRIP
#define USE_LED_STRIP
#define WS2811_PIN PB0

I tested with an 8 led stripe and seems working correctly.

@MRC3742
Copy link

MRC3742 commented Jan 15, 2022

There are three different SPEEDYBEEF7 targets.

If your working with the original target board then PB7 is the pin listed in that target.c file
If your working with the V2 board then the target.c file lists PB0 as the LED pin
If your working with the MINI then PC8 is listed in both the target.c and target.h files and should work as is.

Rich

@andreapede
Copy link
Contributor

andreapede commented Jan 15, 2022 via email

@MRC3742
Copy link

MRC3742 commented Jan 15, 2022

Looks like it works on your target V2 with PB0 as I see you linked a PR for the change.

It should also work on the original target with PB7 but never got a test response from @charizardavi

DzikuVx added a commit that referenced this issue Feb 17, 2022
@charizardavi
Copy link
Author

I will test it soon, thank you so much for all the support.

@DzikuVx DzikuVx added this to the 5.0 milestone Apr 26, 2022
@DzikuVx DzikuVx closed this as completed Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants