Hi Bert,

The trainer I have uses ANT+ and the USB dongle is not a HID device,
so I don't think hidapi.dll would work.  I know lubusb.dll works
because I already have C++ code that communicates with the trainer.

However, I would be interested to have a look a the FFI bindings for
the hidabip.dll, if you can send me a link to them, it would be
appreciated.

Thanks,
Alex.


On Fri, Sep 15, 2017 at 2:11 PM, Bert De Ketelaere <bed...@hotmail.com> wrote:
> Hello,
>
> I started something similar for the Suunto Ambit, but using hidapi.dll. If
> it's of interest I can send it.
>
> Groeten,
> Bert
> ________________________________
> Van: racket-users@googlegroups.com <racket-users@googlegroups.com> namens
> Alex Harsanyi <alexharsa...@gmail.com>
> Verzonden: vrijdag 15 september 2017 7:53
> Aan: Racket Users
> Onderwerp: [racket-users] libusb FFI bindings for a bike trainer control
> application
>
> Hi all,
>
> Has anyone written FFI bindings for libusb?  I tried searching for "usb" on
> pkgs.racket-lang.org, but could not find anything.
>
> I'm planning to write a control application for my bike trainer.  This would
> involve reading data values from the trainer (Heart Rate, Cadence, Power,
> etc)
> and controlling the resistance.  This would be a "poor man's zwift" without
> the 3d graphics (http://zwift.com/)
>
> I have a lot of Racket code that I can reuse for the "GUI" part of the
> application, so it would be relatively easy to write an application that
> allows riding a virtual route, where a "dot" is displayed on a map based on
> distance traveled and controlling the trainer resistance according to the
> gradient for the route.  I already have a map widget and code to manage GPS
> data recorded from real-world bike rides.
>
> What I am missing is the "bottom" part, which would involve controlling the
> trainer and reading data from it.  I already started writing C++ code for
> this
> (as I'm familiar with using libusb from C++), but I thought I'd stop and ask
> here before going too far down this path.
>
> Best Regards,
> Alex.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to