Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VARIANT_USART commands #143

Closed
diogoc opened this issue Feb 18, 2021 · 2 comments
Closed

VARIANT_USART commands #143

diogoc opened this issue Feb 18, 2021 · 2 comments

Comments

@diogoc
Copy link

diogoc commented Feb 18, 2021

Hello. It would be nice if it were possible to send other commands in variant_usart, such as the mode and type of motor control.

@Candas1
Copy link
Collaborator

Candas1 commented Feb 19, 2021

It's actually possible but it's not documented.
If you open this web tool, you can see I am using it already in Ctrl view with protocol hovercar.
image

If you use sideboard_usart instead of control_usart, you can send following command:
https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/36953c6fe9ba90593d21150113459b0a4bb4e312/Inc/util.h#L47

  • start : 0xABCD
  • pitch (not relevant here, you can send 0)
  • dpitch (not relevant here, you can send 0)
  • steer : -1000 to 1000
  • speed : -1000 to 1000
  • switches
    • 0:OFF or 1:ON (for switching input when dual input is used)
    • Control type 00:FOC 10:Sinusoidal 01:Commutation
    • Control mode 00:Voltage 10:Speed 01:Torque
    • Field Weakening 0:off 1:on
    • 0000000000
  • checksum

This you can adapt in the arduino code

@diogoc
Copy link
Author

diogoc commented Feb 19, 2021

Thank you. I will try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants