Live data from Hacker News

MicroPython – Python for Microcontrollers

micropython.org

51–60 of 106 posts

Re: MicroPython – Python for Microcontrollers

#51

Earlier quoted context omitted.

One thing to add from my experiences: it's dramatically more accessible to beginners than Arduino and way more useful for building one-offs/prototypes as well.

My personal experience was the opposite. I own two identically equipped boards: the Seeed Studio ArchMix and the Teensy 4.1 On the archmix, I managed to boot up and that’s about it. There was literally a REPL and I was able to blink the LED and then I couldn’t proceed further, where was I supposed to code? Bad experience. Teensy: connect the board , fire up the teensyduino ide, choose an interesting example from the…

You need to buy a Pyboard from MicroPython, or Adafruit Express board for CircuitPython. Then you get a bunch of onboarding tutorials.

CircuitPython is very nice for beginners, Adafruits tutorials are gold. Switching to MicroPython is very easy (CircuitPython makes some simplifications to be more beginner friendly, MicroPython aims to be as "professional" as possible).

Re: MicroPython – Python for Microcontrollers

#52
post #48
post #16

A possible alternative to MicroPython is Nim - it's a strongly typed language with Python-like syntax that compiles down to C. Since it compiles to C, it can use existing C libraries without much fuss (just wrap signatures as needed), plus there's no need for a "micro" version of the language. Several members of the community have been working on improving the embedded ecosystem: although I haven't played around with…

Nim, Zig, Julia, Rust, so many languages lately ... anyone else with language-choice anxiety?

Not really. Probably only a single-digit percentage of software developers will ever get to use any of these professionally. Howl in protest if you will, but the truth is that all of these (and more) are mostly the domain of students and hobbyists.

If you are already in the industry, and part of the 90+% unwashed masses, then you already know this. If you are a student or hobbyist who hasn't clued into this reality yet, then there's no need for "language-choice anxiety". Play with whatever you want to play with, and once you graduate you should have no problem transferring that knowledge to whatever language your first real job actually pays you for (e.g. Java, Python, C#, etc).

Re: MicroPython – Python for Microcontrollers

#53
post #48
post #16

A possible alternative to MicroPython is Nim - it's a strongly typed language with Python-like syntax that compiles down to C. Since it compiles to C, it can use existing C libraries without much fuss (just wrap signatures as needed), plus there's no need for a "micro" version of the language. Several members of the community have been working on improving the embedded ecosystem: although I haven't played around with…

Nim, Zig, Julia, Rust, so many languages lately ... anyone else with language-choice anxiety?

For micro-controllers having a choice in language is very new and there is still very few languages to pick from. Chip vendors only support C/C++, sometimes only barely.

Many languages (if it is AOT compiled and uses LVVM you can probably get it running on a uC) have POCs for running on an a uC, but often lack the HAL (libraries to use all the peripherals).

Re: MicroPython – Python for Microcontrollers

#54

I hope we see JS for microcontrollers fast enough so we can enjoy bloated Electron apps running on microcontrollers. :) I mean, who wants anything but the fastest, leanest languages running on microcontrollers?

https://www.espruino.com/

Re: MicroPython – Python for Microcontrollers

#55

Earlier quoted context omitted.

My personal experience was the opposite. I own two identically equipped boards: the Seeed Studio ArchMix and the Teensy 4.1 On the archmix, I managed to boot up and that’s about it. There was literally a REPL and I was able to blink the LED and then I couldn’t proceed further, where was I supposed to code? Bad experience. Teensy: connect the board , fire up the teensyduino ide, choose an interesting example from the…

I agree that the user experience, onboarding etc. are very well executed for Arduino (and especially for the ESP32 port of uPython could use some polishing)... > rinse and repeat until you are familiar with idioms for all sorts of things Except that the idioms you learn are really not suitable for anything but toy examples. Arduino is rotten from the core: "setup", "loop" and "delay" are the worst imaginable way to w…

Indeed, those obstacles are easy to overcome, but someone has to point a beginner in the right direction.

As I understand it, the ability to program Arduino in C was originally kind of an accidental feature of Arduino. The original Arduino downplayed C, and referred to the programming language as "wire." A few people (myself included) discovered that by simply ignoring those constructs, Arduino becomes a full fledged C development environment. But I think doing things "the right way" on a microcontroller really requires learning concepts that are not beginner friendly, like interrupts, and for that matter, electronics.

Re: MicroPython – Python for Microcontrollers

#56

Earlier quoted context omitted.

My personal experience was the opposite. I own two identically equipped boards: the Seeed Studio ArchMix and the Teensy 4.1 On the archmix, I managed to boot up and that’s about it. There was literally a REPL and I was able to blink the LED and then I couldn’t proceed further, where was I supposed to code? Bad experience. Teensy: connect the board , fire up the teensyduino ide, choose an interesting example from the…

I agree that the user experience, onboarding etc. are very well executed for Arduino (and especially for the ESP32 port of uPython could use some polishing)... > rinse and repeat until you are familiar with idioms for all sorts of things Except that the idioms you learn are really not suitable for anything but toy examples. Arduino is rotten from the core: "setup", "loop" and "delay" are the worst imaginable way to w…

> "setup", "loop" and "delay" are the worst imaginable way to write embedded software

I agree with "delay", but why do you say setup and loop are the worst imaginable way to write embedded software?

Re: MicroPython – Python for Microcontrollers

#58

Earlier quoted context omitted.

My personal experience was the opposite. I own two identically equipped boards: the Seeed Studio ArchMix and the Teensy 4.1 On the archmix, I managed to boot up and that’s about it. There was literally a REPL and I was able to blink the LED and then I couldn’t proceed further, where was I supposed to code? Bad experience. Teensy: connect the board , fire up the teensyduino ide, choose an interesting example from the…

I agree that the user experience, onboarding etc. are very well executed for Arduino (and especially for the ESP32 port of uPython could use some polishing)... > rinse and repeat until you are familiar with idioms for all sorts of things Except that the idioms you learn are really not suitable for anything but toy examples. Arduino is rotten from the core: "setup", "loop" and "delay" are the worst imaginable way to w…

Why are "setup()" and "loop()" bad? setup() is just main().

Re: MicroPython – Python for Microcontrollers

#59
post #48

Earlier quoted context omitted.

Nim, Zig, Julia, Rust, so many languages lately ... anyone else with language-choice anxiety?

Not really. Probably only a single-digit percentage of software developers will ever get to use any of these professionally. Howl in protest if you will, but the truth is that all of these (and more) are mostly the domain of students and hobbyists. If you are already in the industry, and part of the 90+% unwashed masses, then you already know this. If you are a student or hobbyist who hasn't clued into this reality y…

This is mostly true, but (I cannot believe I am going to do this), Rust is in a different tier compared to the other languages in the list.

From the last who is hiring thread:

Zig =0 mentions

Nim = 0 mentions

Julia = 2 mentions

C# = 4 mentions

C++ = 12 mentions

Rust = 13 mentions

Java = 18 mentions

JavaScript = 30 mentions

Python = 50 mentions

The threads here are not indicative of the overall market and 1 mention != 1 job, but the numbers above are pretty much in line with the proportion of offers I am seeing elsewhere.

Re: MicroPython – Python for Microcontrollers

#60

I hope we see JS for microcontrollers fast enough so we can enjoy bloated Electron apps running on microcontrollers. :) I mean, who wants anything but the fastest, leanest languages running on microcontrollers?

> who wants anything but the fastest, leanest languages running on microcontrollers?

Me. I value speed and comfort of development more than micro-optimizations. Coincidentally this is why Electron is popular.

Post reply on HN