Board index FlightGear Support Hardware

bike trainer with Wahoo speed sensor

Joysticks, pedals, monitors.

bike trainer with Wahoo speed sensor

Postby toddwestley » Thu Feb 04, 2021 4:07 pm

I modified a program so I could control the throttle axis of a joystick by pedaling my bike. I have a Wahoo speed sensor mounted to the rear wheel of my bike on a trainer stand -- the faster I pedal on the trainer, the more throttle applied by a joystick. Here is a link to the software on github: "https://github.com/toddwestley/bike_track_emulation/pulls"

The software basically translates wheel rotation rate into a throttle axis of a joy stick. It could work with almost anything that uses a joystick with a throttle axis, not just Flightgear.

I am unable to ride on roads and started riding around a local school track. I wrote a graphical emulation of that activity so the program could be used on its own.

I know very little about software development. I have no idea how to remedy the requirement to execute the program as super user. Enjoy modifying the program on your own.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby Isaak » Thu Feb 04, 2021 8:06 pm

This is genius :D
Want to support medical research with your pc? Start Folding at Home and join team FlightGear!
Isaak
 
Posts: 768
Joined: Sat Jun 04, 2011 3:52 pm
Location: Hamme, Belgium
Pronouns: he, him
Callsign: OO-ISA
Version: next
OS: Windows 10

Re: bike trainer with Wahoo speed sensor

Postby wkitty42 » Thu Feb 04, 2021 10:28 pm

should use it to fly the human powered craft ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9162
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: bike trainer with Wahoo speed sensor

Postby Johan G » Fri Feb 05, 2021 12:27 pm

Definitively! :D

Search for "dash" in the Aircraft page of the launcher when browsing available aircraft in the official hangar and click the Install button ("Dash Boot", lol :P ).

See also the FlightGear wiki article: Dead Simple Human Powered Airplane (permalink).


Oh, and Welcome to the forum! :D
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6634
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: bike trainer with Wahoo speed sensor

Postby Michat » Sat Feb 06, 2021 11:30 pm

@toddwestley. Nice idea, thanks for sharing. Please do a video.

@Johan G got 404 to your links.

@wkitty42 "should use it to fly the human powered craft :wink: " , maybe a dual cockpit, over a tandem. :mrgreen:

I wonder if we have a bicycle on FG. I would like to climb Alpez D'huez, right now. As toddwestley has shown us, FG could be used as a advanced trainer for static bicycles at home.

29.92
User avatar
Michat
 
Posts: 1229
Joined: Mon Jan 25, 2010 7:24 pm
Location: Spain
Version: 191b
OS: MX 21 Fluxbox oniMac

Re: bike trainer with Wahoo speed sensor

Postby Alant » Sat Feb 06, 2021 11:56 pm

https://github.com/toddwestley/bike_track_emulation works for me.
Work the flab off and fly an airplane at the same time.

Alan
Alant
 
Posts: 1223
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: bike trainer with Wahoo speed sensor

Postby Johan G » Sun Feb 07, 2021 5:21 pm

Michat wrote in Sat Feb 06, 2021 11:30 pm:@Johan G got 404 to your links.

I think you happened to try them right in the middle of the wiki maintenance. They should work now.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6634
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: bike trainer with Wahoo speed sensor

Postby wlbragg » Sun Feb 07, 2021 6:03 pm

It looks like it should "just work" as is with the DaSH. If not and you ever need any filter or mapping to the throttle on the DaSH, let me know and I can add it.
This is something I eventually have to try on the DaSH, it is exactly what it needs.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Sat Aug 28, 2021 12:50 pm

I made a video of me using the Wahoo speed sensor to control the throttle [while the bike was on a trainer stand]. It was a virtual flight from KSFY to KMQB.

Here is a link to a zip archive that contains footage of the departure and landing: "https://drive.google.com/file/d/1BKtz6Z0DKrkl-H0J81k22BeuNgAflbpf/view?usp=sharing" I also like to verify the virtual plane still works after landing so I follow up with a departure. I used linux and not windows.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Bike trainer with Wahoo speed sensor feed back request

Postby toddwestley » Sun Oct 31, 2021 12:52 pm

What I really would like is someone to work with me and make the software I have written more appealing. I know that I am not the only one to ride a bike trainer and not the only one to ride a bike trainer while playing a flight simulator. Thank you for reading my posts; but has anyone tried to use the software I wrote; if you tried and failed, I would like to work with you to resolve the problem. I have never attempted to write software for the public; but, I would like to learn. I am not as quick to learn as I once was so my response to your feedback may not be as rapid as you expect.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby wlbragg » Sun Oct 31, 2021 8:38 pm

Hi Todd,

I am very interested in this for the line of HPA aircraft I am working on in FlightGear. I just added another one today, the Lazarus MK2. The only thing stopping me is I haven't located and purchased the speed sensor yet. I haven't researched them at all. Which sensor did you write this for? I can purchase it as soon as I know which one to get. I have the stationary bike to put it on and like I said, I really want to try it on the HPA's.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Sun Oct 31, 2021 9:23 pm

I purchased a Wahoo RPM Cycling Speed sensor. [Available from Amazon] It fits to your rear hub but I used a slightly larger o-ring to attach it. I think the o-ring the sensor ships with is large enough; but it will likely require more manual dexterity than I have. Good luck. Let me know if you have problems assembling the sensor to your rear hub and I will try to figure out which o-ring i used.

I hope you use linux. I tried programming in windows [C Sharp] but lost motivation.

The program i wrote requires gatttool and the linux program requires sudo privileges, I think because it uses the input system. Make sure your review the source code. As I said before, I know little about coding for the general public.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Wed Nov 10, 2021 4:16 pm

I think the o-ring I used to hold the Wahoo sensor to my rear speed hub was 131 series.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Sat Apr 09, 2022 3:01 pm

I have never formally developed software for use for others. What I wrote is close but not quite good enough for use by the general public. Is anyone actually using any of the software I wrote? Did anyone notice the subtle use of the exponential function to translate cycling speed into a throttle position? Did anyone modify the parameters of that function to better match their performance? Any suggestions for improvements?
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Sat May 07, 2022 6:31 pm

I just learned that the program I used to develop my scheme has been "deprecated" so that means that my program is also deprecated.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest