gearsincorg / Hoverboards-for-assistive-devices

Use Hoverboards to add motor drives to assistive devices.
MIT License
16 stars 10 forks source link

WIP: Platformio build support #2

Closed alsuren closed 8 months ago

alsuren commented 3 years ago

Firstly, thank you for documenting your working with the hoverboard hacking. It makes me feel more confident about making community contributions to this repository.

I don't currently have access to a machine for running kiel on, so I have been using platformio from my raspberry pi 4 (using vscode remote). Would you be interested in having the platformIO build support upstream?

maxgerhardt has been super helpful with this effort on the platformio forums https://community.platformio.org/t/library-for-gd32f130c8/7410 so I can't take credit for very much of this code.

There is a bit more work to be done before this PR can be merged. Specifically:

This PR is part of a larger project, which is tracked on trello at https://trello.com/c/UuC7P5Xo/37-make-firmware-turn-the-motors . In my next PR, I would like to make a shared library for the protocol definition + CRC code, and use that to write a raspberry pi program for sending movement commands. Does this sound like a sensible plan?

gearsincorg commented 3 years ago

Hi @alsuren .

I actually know nothing of Platformio. On reading is bit about it, it seems like a valuable activity, (especially for non windows users).

I mainly published this repo to share the code, without expecting folks to actually want to push changes. It's got me thinking. I haven't been active on this project lately, so it would likely be a while before I could test out your PR's on my dev environment. Some of your commits look pretty benign (weird gcc bug !!), but others get into areas that I'm not familiar with, so I'd definitely need to make sure it doesn't break my setup.

Your plan seems like a reasonable one. I definitely don't want to discourage you from making suggestions to my Repo, but I can't promise how responsive I'll be able to be with intake.

alsuren commented 3 years ago

I mainly published this repo to share the code, without expecting folks to actually want to push changes. It's got me thinking.

Open Source community management is something that I've been thinking about a lot recently. I've been trying to get to the nirvana of "Optimistic Merging" for my projects (http://hintjens.com/blog:106), but this must be really difficult to achieve for a hardware hacking project, because you normally need a copy of the hardware in order to test any changes.

My initial instinct was that I would like to be able to contribute the the upstream -Gen2 repo directly, but it is explicitly unmaintained. My next thought was contribute to the -FOC project (which is reasonably active and already uses platformio, but not on split mainboards). Your project seems like a good fit for what I'm trying to do (control a kite from my raspberry pi) so I picked you as a victim for my first pull request.

I haven't been active on this project lately, so it would likely be a while before I could test out your PR's on my dev environment. Some of your commits look pretty benign (weird gcc bug !!), but others get into areas that I'm not familiar with, so I'd definitely need to make sure it doesn't break my setup.

I think that's reasonable. I suppose this repo represents a known-working archive of code for a hardware hacking project, so merging untested things into master might not be appropriate.

Your plan seems like a reasonable one. I definitely don't want to discourage you from making suggestions to my Repo, but I can't promise how responsive I'll be able to be with intake.

Thanks for you advice. So far I have just been testing the waters and working out a plan. I think the best thing for me to do next is to do a long spike to see what is possible, then clean up the things that I think are valuable and work out where to contribute them. I may end up contributing the same ideas to multiple repos. We will see.

gronat commented 3 years ago

@alsuren This is excellent! Willing to help you with the platformio support despite my experience with platformio is somewhat limited. As for the Keil uVision on Linux, I run it on Mint using 'winehq' and it seems to be working.

alsuren commented 8 months ago

Just closing some old PRs. Nothing to see here.

My housemate ended up porting rust to the hoverboard in question, and writing a basic controller for turning the wheels in response to xbox controller input.

The application code lives in the https://github.com/hoverkite/hoverkite repo and the lower-level gd32 chip support code lives in the https://github.com/gd32-rust organisation.

I have also let my attention be drawn elsewhere, and the hoverboard is currently living in our loft with the battery disconnected.

If anyone tries using our rust code as the base for their own projects, I would be interested in hearing experience reports. Pull requests would also be welcome, even if they have nothing to do with flying kites.