This is how I started, maybe it helps.
Now it’s on hold since I have been working on the gd32 drivers and sfoc.
This is how I started, maybe it helps.
In the meantime I worked on a thumb throttle input.
Coding was easy, but finding the right analog pin and soldering the connector was not.
Nice, I runs smooth
Still sounds like field weakening to me
Definitely worth a try.
I wonder if there are smaller Wire and Serial libraries, too.
You’re using the adafruit MP6050 lib in your project. Is that the smallest?
I could install them all and test them one_by_one. But they had to be much smaller than the tinyMP6050.
I didn’t pay attention to be honest.
I thought when only using adafruit librairies, some of the functions would be reused and probably reduce the size. But I had no motor control back then, so the size was ok.
Ah, I was wondering which sideboard had motor FETs…
You wanted to use them with external driver boards.
My idea is that all those boards are something in common:
- splitboards : single motor control + leds + IMU + optical sensors + remote
- sideboards : Leds + IMU + optical sensors + remote
So a sideboard is a splitboard without motor control.
But a sideboard could be controlling a splitboards with I2Ccommander
My splitboard doesn’t run with commander. Unless it can receive commands with SerialComm?
It’s basically a switch/case list and should also work with i2c-data.
Even worse, my sideboards have GD32F130C6 MCU with only 32k flash. It’s unlikely that it is able to drive a motor with sFOC.
Even some splitboards have those chips…
But those probably don’t do FOC.
Now that I have my thumb throttle input working, I’d like to try Blutooth-remote control.
But I don’t have any sender- device.
Can you recommend something? I wouldn’t like to use an Android App.
You can just use your MacBook/Laptop?
Or else ESP32s have BT built-in, as do Nordic based boards like the Nano 33 BLE / Sense.
I even created a web app that works on mobile lol
Although it’s using the firmware’s specific binary protocol, it can send Ibus frames through bluetooth that you could pick up with a library.
But this app was used only for testing, there is a risk if you get a call or notification while you are controlling the motors.
I can’t imagine myself running behind my electrified lawn mower with a Laptop or Chromium-compatible smartphone Even worse on a Longboard
Unless the mobile App makes use of the IMU? But AFAIK it shows two joysticks on the screen…
I figured, a Wii RemotePlus would be an option, if I can bind it with the bluetooth module of the hoverboard?
I think you need to investigate based on your needs then.
It was a short investigation.
I tried to compile an i2c scanner to find the address of the BT-module. But soon figured out, Wire.h will never fit in the remaining flash.
I tried to figure out how to use qfplib and stumbled on a nano-float library based on the qfplib.
But I couldn’t figure out how to use it?
Why isn’t either of it part of the arduino-universe?
This aims to wrap the qfplib math functions so it replaces the gcc built-in math functions, and derives the functions missing in qfplib.
I think it still requires to add the wrap option to the compiler and the include should be added in each source file.
That would be easier for you to test the same way I did here
That means you have to replace atan2 by the qfplib function even in the libraries.
That sounds like a lot of work, but it could probably be done by a batch-file.
It would be helpful, every time the original library gets updated.
I’ll see, if my notepad++ editor can do that for me
I take it, you were using the full qfplib with all options? There was a confusing compiler-options list. I don’t know how to make it happen.
The way I did it in that commit, I didn’t need any compiler option, because I directly use the qfplib functions.