r/pythontips • • Apr 02 '21

Python3_Specific Basics of Embedded and IoT Development with Python

If you wondering whether there ways to control micro-controller boards using Python, Here is an in depth article just about that;

https://kalebujordan.dev/basics-of-embedded-and-iot-development-with-python/

29 Upvotes

5 comments sorted by

1

u/9acca9 Apr 03 '21

For raspberry pi i need to install an O.S? I mean, just now i need wifi in the raspberry and nothing more. And is a rpi zero w, so almost nothing of memory so... i will like the minimum

Thanks.

1

u/Qwerty1bang Apr 03 '21

You can control the pi at a very low level using C programming. You will not need an OS.

If you do this you will have to reproduce the functions that you need.

If 'all you need is WIFI' then you will have to build so much software that you will be better off installing a minimal OS and then running on top of that.

WIFI is built on a TCP/IP stack which depends on a lot of other software to work.

Python will also need many low level functions to work.

A Pi Zero has plenty of memory for an OS, a python interpreter, and some application code. If you do not have enough for your application then consider moving to a larger Pi.

1

u/9acca9 Apr 03 '21

Thanks for taking the time to answer. I did not know that you could run a program without an operating system (interesting). I really dont know if it is a memory problem, maybe is related to other thing (probably dont). The major problem i have is a module i import that take like 8 seconds to import........ Thanks.

1

u/Qwerty1bang Apr 03 '21

That module could take a long time to load because:

  • it is large or has many dependencies.

  • it has to do some (heavy) calculations during initialization.

  • it depends on other systems (network resources?).

  • physical memory is full and has to swap to disk.

1

u/9acca9 Apr 04 '21

The module is Python Chess.

Thanks for your answer.