Wahoo Kickr Bike - External Gear Display

I may have the color worked out for the tilt/grade. @_JurZzang2749 was kind enough to toss in a variable called “negative” in the grade calculation that we can use to change the font color. No additional checks should be necessary.

void update_grade(void) {
// tft.drawString(grade, 140, 10, 4);
tft.fillRect(100,90,tft.width() - 100,90,TFT_BLACK); // fillRect to clear lower part of screen
if(negative == 1 ) // variable used in gear calculation
{
tft.setTextColor(TFT_GREEN, TFT_BLACK);
}
else
{
tft.setTextColor(TFT_RED, TFT_BLACK);
}
tft.drawString(grade, 80, 90, 6);
}

You’ll need to set the font color for the gear display, too, since it refreshes all the time as well, and the board likes to stick with the last font color it knew about.

void update_gear(void){
// tft.drawString(frontgear, 0, 0, 7);
// tft.drawString(“:”, 35, 0, 7);
// tft.fillRect(50,0,tft.width() - 50,50,TFT_BLACK);
// tft.drawString(reargear, 50, 0, 7);
tft.setTextColor(TFT_SKYBLUE, TFT_BLACK); // Set gear font color
tft.drawString(String(frontgear), 15, 5, 8);
tft.drawString(“:”, 75, 5, 8);
tft.fillRect(100,5,tft.width() - 80,80,TFT_BLACK);
tft.drawString(String(reargear), 110, 5,8);
}

I think that will work. This also incorporates the fillRect to get rid of that pesky artifact.
I’m also keeping the original code there, just commented out.

1 Like

so this draws a solid black rectangle before drawing the grade string - I’m getting there

1 Like

Brilliant - thanks for all your help.
Wish I knew what I was doing and could figure it out myself.

Totally works.

Glad to help.
Looks good!

If you want red text for negative gradient, change the “if (negative == 1)” line to “if (negative == 0)”

But I can see how green is good ….

yeah I actually figure that out myself - although I was going to swap TFT_GREEN and RED in positive or negative tilt.

Can’t figure out which way round I want it. I was thinking + should be green, but then on climb profiles the steeper the more red.

void update_grade(void) {
// tft.drawString(grade, 140, 10, 4);
tft.fillRect(100,90,tft.width() - 100,90,TFT_BLACK); // fillRect to clear lower part of screen
if(negative == 1 ) // variable used in gear calculation
{
tft.setTextColor(TFT_GREEN, TFT_BLACK); // positive tilt
}
else
{
tft.setTextColor(TFT_RED, TFT_BLACK); // negative tilt
}
tft.drawString(grade, 50, 90, 6);

I guess it boils down to personal choice.
Zwift does show steeper climb in red, so that makes sense.

I forked this to work with lilygo t-dongle with a display.

It also sends the data on to sauce and also detects brake lever presses which I use another tool to mimic keyboard presses to do.

Theoretically you can put in the location of your sauce install and wifi connection details and then just plug it into the bike.

Its pretty rough but I’ve been using it the last few times I’ve been on my bike and it seems to work ok.

3 Likes

how do you then see/display the data in Sauce though?

1 Like

You might need a mod to read the fields it adds to the “self” athlete.

I have my own tool on top of sauce for most of my display stuff, so I haven’t got a mod for that.
There should be a repo for my other bike gear sauce mod that uses bluetooth from a mobile device. The display window from it should show the same.fields.

There will be mods out there that can be modded to read the fields fairly easily though

Hi,
Great idea and good extension for the KickrBike - unfortunately I don’t have one - Wahoo Kickr V5. However, I am looking for how I can access Zwift internal variables such as power, heart rate and incline/elevation (Prio1) and speed, distance, … (Prio 2) via BLE or WLAN with an ESP32/Arduino. I would like to use it to control fans in a “load-dependent” manner. Is there an easy way here? Maybe an example sketch?
It would be great if someone could help me.

Hi

For the “standard” fitness equipment BLE protocols, you should be able to find most of the documentation online.
The more or less “freely” implemented gear indicator protocols of the smart bikes I had so far, seems way more random.

What I did was connect the bike to the nRF Connect app from Nordic and started looking around for data changes. You can also do that for the documented values.

Have fun :blush:

BòóX

Hi BooX,

thanks for the quick reply. But I don’t fully understand it. Is there a way to pair an ESP32 with Zwift via BLE (in addition to the Wahoo Kickr, e.g. as a steering device) and access the data - minimum incline/grade, heart rate and power? Is there a demo sketch for Arduino? Best regards Em

I adapted the code for my Wahoo KICKR BIKE SHIFT to display the gear information on a LILYGO T-Display-S3.(Since the bike comes without a display and Zwift is sadly not displaying these informations.)

I am by no means a programmer so do as you please. :wink: And because I’m not allowed to post URLs please remove the spaces …
github. com / stareat / wahoo-kickr-bike-shift-display

6 Likes

Nice that you got it to work with the Wahoo Kickr Shift.

I have just ordred the display. Now I know it works :blush:

Can’t wait for the display to arrive.

1 Like

The posts I made above were done for a KICKR BIKE SHIFT as well, which is why I could not accurately test the grade changes.
It’s the same BT signal, so it will work with either.

1 Like

Curious if you could catch the power as well.

I’m thinkering with the idea to use it for controlling a led strip as well. So it could display my power zones.

Power service and property are very easy to identify via a BLE packet sniffer app. See image below.

3 Likes

Power would be really nice, especially on the bigger S3 display :grinning:

BòóX

Hi Stareat,
I like you code for the Wahoo Kickr Shift displaying the gears.
I have no clue about programming.
Is it just download and put your files on it when I get my Lilygo (hopefully during next week)?

I updated the GIT page with instructions on how to use the code.

3 Likes