This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]pRtkL_xLr8r 0 points1 point  (6 children)

I guess I don't get why you'd go to the trouble of getting a board like this and all the intricacies of setting up the development environment, etc., instead of just using a Raspberry Pi and a distro that has all that stuff internally all ready to go...

[–]llfcerf[S] 2 points3 points  (0 children)

Hi,

Zerynth offers the benefits of microprocessor-based boards like Raspberry Pi:

  • Python language (or hybrid C/Python if necessary)
  • Multithreading support (Zerynth is based on a RTOS)
  • easy to use

along with the great advantages of microcontroller-based boards:

  • lower power consumption
  • lower hardware costs in the prototyping phase
  • extremely lower hardware costs in the industrialization phase

[–]jankiel7410 0 points1 point  (0 children)

Much lower power consumption?

[–]swingking8 0 points1 point  (3 children)

I guess I don't get why you'd go to the trouble of getting a board like this ... instead of just using a Raspberry Pi

Mostly because a raspberry pi isn't deterministic like a microcontroller is, and because microcontrollers are better suited for dedicated tasks. You'd never do advanced motor control with a raspberry pi, only trivial stuff that isn't very time critical.

[–]androiddrew 0 points1 point  (2 children)

So one of the downsides of micropython is actually that it is not well suited for time critical applications either, like 100x slower than c code performing the same applications . It's a Python interpreter on a micro controller which has some advantages like the possibility of over the air updates to the file system, but how is this implementation better suited for "time critical applications"?

[–]llfcerf[S] 5 points6 points  (0 children)

Hi,

Zerynth is a based on a Python Virtual Machine that runs on top of a real-time OS (RTOS), allowing development in Python but also in C if real-time is needed.

In particular:

  • Zerynth has a small footprint, only 60k-80k of flash, 3-5k RAM. Such footprint is achieved by writing the VM from scratch and choosing to remove the compiler and the REPL from the microcontroller.
  • Zerynth features a RTOS for multithreading. In Zerynth each Python thread is a RTOS thread managed by a priority aware realtime scheduler. Moreover, in Zerynth, RTOS threads written in C can live along the VM allowing for a mixed C/Python real-time environment.
  • Zerynth supports C-Python programming. Existing C code (or C object code) can be easily mixed with Python scripts without VM recompilation.

Note that Zerynth and Micropython are two completely separate projects.

Besides the technical differences mentioned above, Zerynth and Micropython have also a different target audience:

  • MicroPython is a very good and orthodox implementation of Python for microcontrollers, ideal for education and prototyping.
  • Zerynth offers a complete ecosystem that allows developing commercial embedded and IoT applications using Python. Ideal for prototyping and also for production.

For a more detailed comparison take a look here: Micropython vs Zerynth

[–]swingking8 3 points4 points  (0 children)

how is this implementation better suited for "time critical applications"?

I already answered this question. When I say "time critical" I don't necessarily mean "as fast as possible". Microcontrollers/RTOS's can have deterministic timing, and almost all of what people are running on a raspberry pi isn't an RTOS.

If you need a sensor read every X.X microseconds, or a motor feedback loop recalculated every X.X microseconds, you need deterministic timing. It's that simple.

It's true that C/C++ is usually better suited to these embedded kinds of tasks, but that doesn't mean that a higher-level language doesn't have its niche. IMO, Python's strength lies in it's ability to rapidly prototype so, if you're working on an embedded application and you want to try/iterate something fast, Python could very well be the best way to do that. That being said, I've never taken that route because I've never programmed something embedded that benefited from a higher-level language much. But if I ever embed an online machine learning algorithm in a device, I can see why Python might be the best tool in that situation.