Hi everyone,

I would like to learn to program and built project using MicroControllers

I’m a Python dev. Therefore I would like to use it to program those.

But I’ve no idea where to start…

  • For the hardware:
    • What will be the best Raspberry Pi or Arduino ?
      I know they are not the same thing but could tell me in which situation you use more one than the other ? Or do you use something else ?
  • Software
    • I’ve already my IDE VisualCodium
      What is MicroPython Vs CircuitPython ?

If you have any resources I’m all eras.

Thanks.

  • fubarx@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    3 months ago
    • Raspberry Pi runs general-purpose Linux-based operating systems. Most also come with python and provide libraries so you can access the peripherals and pinouts. It also supports other linux services like windowing, processes, etc. It’s useful if you have to control a lot of peripherals at once, for example, in a 3D printer, or a robot.

    • Arduino is designed for much smaller processors, typically with limited RAM and no protected memory. So you just run a single program each time it boots up, usually in a big loop that looks for changes in state (for example, a button press) and reacts (turns on a motor or light). OK for a lot of projects, but it slows down once you add too many devices.

    • There’s also an intermediate system called FreeRTOS that lets you run multiple ‘tasks’ at once, so you can squeeze more juice out of a simple microcontroller. Arduino and FreeRTOS are usually programmed in C/C++.

    • Micropython is a smaller version of python that runs on those small microcontrollers. It has the standard libraries to support IO pins, etc, but if you buy an add-on board, you’ll want to make sure it has the right drivers for it to work in Micropython.

    • CircuitPython is a slightly simpler version of Micropython, built and supported by Adafruit and last I checked, mainly used on boards made by them. They have lots of lessons and introductory material to get people started.

    If you want to start from scratch, recommend getting an ESP-32 based dev board from Adafruit or Sparkfun, then installing either of the Pythons on them.

    If you want to get into soldering, a plain no-name off AliExpress will also work. But Sparkfun has a small connector called Qwiic (Adafruit also has a similar one they call Stemma QT). Then get a few fun peripherals like a switch, a lamp, an environment sensor, and maybe a stepper motor with those connectors. They just plug into each other and you’re good to start coding.

    If you want it all in a compact package, including a screen, then check out M5Stack. They are the same inside, but in a more approachable package. They use a different wiring system called ‘grove’ so it’s easier to plug and play with their peripherals.

    If you want to get into home automation, check out HomeAssistant and their ESPHome project.

    The nice thing about using python is that there’s no separate compile-then-flash step. In most cases, you plug the board in, it appears as a drive, and you drag-drop your code file onto it. As your skills improve, you may find that your ideas may outgrow the tools. Feel free to jump up to Arduino, FreeRTOS, a linux, or an Android based system.

    It’s all good. Best of Luck!