Host connectivity with firmata

I just received my SimpleFOC shield. I can wait to dig into it!
I recently wrote a javascript port of the fibre protocol for odrive with is also an awesome open source project.
If it hasn’t already been talked about, I’d like to recommend the firmata project for real time host connectivity to SiplmeFOC.
Seems like the perfect fit to me.

Can you describe what you mean a bit more?

I think what you probably asking for is firmata but with simplefoc api also exposed. I don’t think that is typical, but it is an interesting idea.

The challenge is that a lot of us are heavily configuring simplefoc for our chosen motors/drivers/sensors.

Perhaps defining a nice serial interface that can persist config to eeprom and be used over rx/tx, can, bluetooth should be where our focus should be. Some of this is already in SimpleFOC with the motor.command(string) function. It doesn’t persist config, and plumbing to expose over can/bluetooth is left to developers.

I am suggesting exactly what you mentioned, exposing the simplefoc api just as the StandardFirmata example exposes the servo library over the wire.

Hey @Jeremy_Ebert,

Would you care to explain the benefits of using firmata over another communication protocol?

@David_Gonzalez,
I really like the the way firmata abstracts the microcontroller into a wire protocol that can be very easily controlled by a consistent api with any language you want. That’s why I like the FIbre protocol developed by Odrive as well.
It is completely possible to rewrite the routines of the SimpleFOC library into something like javascript and use firmata to keep the hardware in sync but with the latency over the wire would negatively impact the algorithms.
All of that being said, CAN and other protocols definitively have the ability to do very similar things.

1 Like

You can use the ConfigurableFirmata architecture to wrap 3rd party libraries like SImpleFOC.

ConfigurableFirmata has an nice example wrapper for this handy encoder library. It shouldn’t take much to wrap the SimpleFOC encoder.