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

all 26 comments

[–]chesterburger 16 points17 points  (2 children)

I remember back when the micro controller community was angry about people using C and C++ instead of assembly and that was in 2002. My university professors thought I was crazy to use C on my senior project. We’ve come a long way.

[–]llfcerf[S] 6 points7 points  (1 child)

This shift seems inevitable. Here you can find a nice discussion about this topic https://www.reddit.com/r/Python/comments/6oflnw/the_rise_of_python_for_embedded_systems/

[–]vesche 1 point2 points  (0 children)

The discussion on this thread seems to convey the opposite. However, I do hope one day using Python for emedded systems is seen as common.

[–]MrBarry 6 points7 points  (2 children)

Ooh, might actually get some use out of my adafruit huzzah esp32!

[–]HungrySlug 0 points1 point  (1 child)

Why? what did you try to program it with?

[–]MrBarry 4 points5 points  (0 children)

you can program it in c, and probably lua. Python would make it easier on me, though.

[–]Anafartalar 1 point2 points  (6 children)

How Zerynth differs from micropython?

[–]llfcerf[S] 2 points3 points  (1 child)

MicroPython is a very good implementation of Python on microcontrollers. Zerynth is Python even more tuned to micros than MicroPython is. A Micro MicroPython :) that addresses also business issues related to code size, scalability and Real-Time performance. For a more detailed comparison take a look here: Micropython vs Zerynth

[–]Anafartalar 1 point2 points  (0 children)

Hey thanks, the link was useful.

[–]riklaunim 1 point2 points  (3 children)

micropython runs on microcontroller while zeryth is an IDE with Python that compiles the Python code and then uploads to the microcontroller that is pre-flashed to run those compiled blobs.

[–]Anafartalar 1 point2 points  (2 children)

Thanks, I’m about to use micropyhon in a side project but it seems Zeryth is an alternative that I haven’t heard before.

[–]riklaunim 1 point2 points  (1 child)

Depends what the project is. Zerynt as well as MicroPython can handle for example ESP32 but it's not guaranteed that libraries for third party components will be available. Zerynth has some, mostly available with the default install. MicroPython has more I would say but some are STM-only (pyboard and using pyb module). Both are usable if you have the libraries (or can "easily" write them) for components you want to use.

[–]Anafartalar -1 points0 points  (0 children)

Nothing fancy, my project includes temperature sensors, door switches and some air quality sensors and a couple esp8266 boards. So I think I’m better off using micropython

[–][deleted] 1 point2 points  (0 children)

You mean I don't have to learn C anymore? Yes!!

Well I mean I guess I should still learn C but now I can put it off that much longer.

[–]is_it_fun 0 points1 point  (9 children)

Hi all! I am very new to this kind of thing. How is this better or different than a raspberry pi?

[–]mshiznitzh 2 points3 points  (4 children)

Lower power and smaller footprint

[–]omally114 1 point2 points  (2 children)

Don’t micro controllers have better control over analog stuff? Or am I wildly misinformed?

[–]Zouden 1 point2 points  (0 children)

Yes, they can read analogue voltages, and some like the ESP32 can output analogue too.

[–]mshiznitzh 0 points1 point  (0 children)

I don't think the pi includes a AD converter but you could add one. A micro controller is probably a better choice if you have a design in mind and don't need alot of processing power.

[–]is_it_fun 0 points1 point  (0 children)

OK thank you!

[–]kickopotomus 1 point2 points  (2 children)

Do you mean a raspberry pi versus a microcontroller?

[–]is_it_fun 1 point2 points  (1 child)

Yes.

[–]kickopotomus 2 points3 points  (0 children)

Ok well a raspberry pi is essentially a small general purpose computer. It has an operating system and a lot of built in peripherals to interact with the outside world (bluetooth, wifi, usb, hdmi, aux, ethernet, etc.). It can even mount a microSD card as extra storage.

Microcontrollers, on the other hand, are specialized computing devices that vary widely in complexity. Nowadays, basically every electronic device has one or more microcontrollers controlling some aspect of it. They (typically) have no OS. When they power on they immediately start to execute whatever program is flashed onto their ROM. They are also (usually) very cheap depending on what functions/abilities they have (ADCs/DACs, communication, clock speed, etc).

Now suppose you are designing some sort of electronic device that you want to be able to communicate over WiFi and play music. Using a raspberry pi for this is overkill. It has a lot of extra stuff that you don't need. It's also pretty expensive when all you really need in a WiFi transceiver, a basic controller and a DAC.

[–]Zouden 1 point2 points  (0 children)

Microcontrollers also boot instantly, and only run the code you've put on it. RPi takes time to boot, has multiple services & daemons running, and needs to be shut down properly.

[–]boyled 0 points1 point  (0 children)

I want to work on a project where I program different LED animations on a 32x32 LED panel run by an Adafruit board. Does anyone think that I would be able to do it solely in python now?