Board index FlightGear Support Hardware

bike trainer with Wahoo speed sensor

Joysticks, pedals, monitors.

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Sun May 29, 2022 6:43 pm

By downloading with the command "git clone https://aur.archlinux.org/bluez-utils-compat.git", unpacking, and than configuring with "--enable-deprecated"; then "make: and "make install." I appear to be able to recompile the program again. Now, I want to implement usage of the "last wheel event".
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Fri Jun 03, 2022 3:56 pm

I learned that bluez-5.49 can be configure with an --enable-deprecated option. So my effort to rewrite the software I wrote moves forward again. I hope to include usage of "wheel events" to enable determination of speed at a higher resolution and a configuration file how to translate speed into throttle position. When I get the new software functional on my home pc, I will post it.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Sun Jun 12, 2022 7:02 pm

I posted revised software on github: "https://github.com/toddwestley/bike_track_emulation" I wish i had done a better job of documenting things, but at least this what I have is better than nothing. Does anyone use the software i wrote -- I've never tried to publicly share software I wrote before -- it's not my profession.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby TheEagle » Mon Jun 13, 2022 1:29 am

@toddwestley I don't (because I don't have a bike trainer) - but on your GitHub repository page, in the headerbar you can go to "Insights" then in the upcoming sidebar go to "Traffic" - there you can see a graph and counter of cloners, clones, viewers and views of the repository.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Thu Sep 15, 2022 2:57 pm

An Arduino can also be used to control the throttle in flightgear with a bike on a trainer with a cycling speed sensor. This gets around the requirement to use SUDO. What should I do next? Make a new branch on github? Is this a "hardware" or "software" enhancement? Does this enhancement work on windows? Eventually, I intend to get second Arduino joined to the first so the device is created that appears to the operating system as joystick if a bicycle is present with a cycling speed sensor.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby wlbragg » Thu Sep 15, 2022 7:01 pm

Make a new branch on github? Is this a "hardware" or "software" enhancement?

It could be both. I'm not sure I completely understand what your asking. How does it fit with the existing code? If it is completely stand alone, a new branch would be nice.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
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 wlbragg » Thu Sep 15, 2022 7:20 pm

Just so you know, I still have every intention on using this software on HPA's. I'm still trying to commit to a sensor. I guess I need a cadence sensor as my trainer only has access to the peddles. Any recommendations? What does the sensor need to output for your software to work? What input mechanism does the pc use to capture the data coming from the sensor. I guess what I am asking is how does the pc get the data coming from the sensor, if blue tooth, does the pc just handle this natively? Your program then is the patch from that data to the FlightGear networking protocol?
Some instructions for "Dummies" would really help people like me that need a map.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
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 » Thu Sep 15, 2022 9:08 pm

You need a computer with bluetooth. If the computer does not have bluetooth, Arduinos with bluetooth exist that can translate the signal from a BLE device to a signal that flightgear can use (only linux, I think). Wahoo also makes cadence sensors that mount to crank arms. I think the code I just started writing for the Arduino could be readily adapted to a cadence sensor with the exception of the exponential equations to account for lower trainer resistance as the trainer heats up. Other sensor exist that are functionally equivalent to Wahoo sensors; but I know a Wahoo sensor will work. I will author instructions over the next couple of weeks.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby wlbragg » Thu Sep 15, 2022 9:15 pm

Thanks for the clarification, I'll work on identifying and acquiring the sensor I need. It is of considerable interest to me and my work with 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: 7588
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 » Fri Sep 16, 2022 4:56 pm

If it were my decision, I would get a Wahoo cadence sensor "https://www.amazon.com/Wahoo-Cycling-Cadence-Sensor-Bluetooth/dp/B00L9XNFPY/ref=sr_1_5?crid=22NG5T1E0JJU&keywords=cadence+sensor&qid=1663343262&sprefix=cadence+sensir%2Caps%2C72&sr=8-5' You can save money by getting other brands. But that may lead to problems.

To read the bluetooth signal from sensor you need a computer with bluetooth of equip a computer with bluetooth. I use a CSR dongle "https://www.amazon.com/ideapro-Bluetooth-Transmitter-Raspberry-Headphone/dp/B00OH09OXS/ref=sr_1_17?crid=1TFPXE3U5CMYA&keywords=%22Cambridge+Silicon+Radio%22+bluetooth+dongle&qid=1663343639&sprefix=cambridge+silicon+radio+bluetooth+dongle%2Caps%2C42&sr=8-17"
The cadence sensor can be coupled with a speed sensor but joining the two is not necessary.

I use linux....Are you comfortable using linux? Do you program your computer? At the moment, I am learning how to program an Arduino to read the speed sensor or control the throttle position in FlightGear.. Arduinos with blue tooth are available, too. Do you have a budget and schedule for your project.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby wlbragg » Sat Sep 17, 2022 6:33 pm

Are you comfortable using linux? Do you program your computer?

Yes to both, although I would most likely make sure this also works in Windows as IO also spend too much time on that OS.

Do you have a budget and schedule for your project.

Yes, I'll take a look at your suggestion and possibly order it in the next week.

I also have a couple types of basic Arduino board that I have done some limited interfacing to FG just as a lesson to learn how it works. So I would also potentially be interested in that part of it.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
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 » Wed Dec 07, 2022 9:46 pm

WLBragg,

I think I saw your name on the start-up screen for FlightGear. Thank you for contributing to that simulator.

I have authored two scripts for an Arduino Wifi Rev 2 and an Arduino Leonardo that combine to transform a bike with a speed sensor in to a joystick throttle axis. At this point it almost work. It basically bypass the requirement to use elevated privileges. When I get it working I will post it somewhere somehow.

Again, thank you for contributing to FlightGear.

I will concede that I would be bored virtually flying around the country if I was not preserving my cycling abilities.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Fri Dec 09, 2022 4:33 pm

I just completed a short FlightGear virtual flight using only Aduinos (and my bike) to control the throttle. After I have stop being amazed (I am not humble) , I will post the Arduino sketches and with instructions.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby toddwestley » Fri Dec 09, 2022 5:02 pm

My posting needs improvement... "https://github.com/toddwestley/Arduinos-to-turn-equipped-bike-into-Joystick-with-throtle-axis" But, I know the posted code worked for me. If you have suggestions or questions, please post them.
toddwestley
 
Posts: 27
Joined: Wed Feb 03, 2021 11:46 pm

Re: bike trainer with Wahoo speed sensor

Postby SurferTim » Sat Dec 10, 2022 11:33 am

What "elevated privileges"? I will assume you use Linux or some derivative, If Linux, check your groups. If your user name is not a member of the dialout group, you will need to use sudo to access usb ports.
Fly low. Fly slow. Land on a dime. Twin Otter. https://github.com/SurferTim/dhc6p
My other aircraft is a Citation-X https://github.com/SurferTim/CitationX
PirateAir videos at https://www.youtube.com/user/SurferTim850
User avatar
SurferTim
 
Posts: 1708
Joined: Sun Dec 09, 2018 6:49 pm
Location: Miramar Beach, FL
Callsign: Pirate
Version: 2020.4.0
OS: Ubuntu 18.04

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 5 guests