2018-05-18, 02:54 AM
(2018-05-17, 10:58 AM)quetzal Wrote: Hello,I do hope to support micropython. As far as I know it should be possible.
I've an esp32 and a board "m5stack" which include a mpu9250. I've bought planning to code an autopilot with it, but then i discovered pypilot.
Do you think it will be difficult to port pypilot to these boards ? (i've not yet looked the code of pypilot). Since m5stack support micropython, have a screen, the mpu9250, wifi, etc... it would be a good choice to keep a pilot without raspberry. I know python but i don't know the limitations of micropython (perhaps you don't know too
Congratulations for making this pilot, it's the missing opensource part of sailing for the moment.
It would be worth the effort to support smaller platforms.
The key features I am unsure of:
1) multiprocessing -- This is probably the most difficult to deal with. Pypilot uses several processes to offload to avoid stalling the control loop. and enable processing elsewhere when waiting for data transfers. It should be possible to make it work with a single process for proof of concept, but some type of prioritised threading is prefered.
2) networking (sockets) -- possibly already supported over wifi anyway for remote control and config
3) filesystem -- or the ability to read and write to just a single file to store configuration
4) 520kb ram -- is it enough? I think probably, but not sure how efficient micropython is
The part reading from i2c would need to be ported from linux devices but I don't think it would be too difficult, the same for commanding the motor over a serial port to the controller.
I think certain features like the webserver for browser control would be difficult without a rewrite, but this is not really that important initially. The existing LCD menu interface can probably be ported.
So... yes it's possible, but I don't have the hardware at this time or I might try it.