Live data from Hacker News

CircuitPython: Programming Hardware in Python

github.com

21–30 of 87 posts

Re: CircuitPython: Programming Hardware in Python

#21
post #17

What adafruit board would be best for a beginner (at circuit python but long time developer otherwise) dad and his 8 year old kid?

Adafruit’s line of “featherboards” are pretty neat and user friendly. For circuit python, you plug the board in over usb. It’s detected as a mass storage device like a usb drive. You drag and drop a python file over to it that you want to run. https://www.adafruit.com/product/4516

Re: CircuitPython: Programming Hardware in Python

#22
post #20
post #17

What adafruit board would be best for a beginner (at circuit python but long time developer otherwise) dad and his 8 year old kid?

from a programming point of view, all are the same. But if you want to introduce your kid to play with sensors and other stuff, I'd get Playground Blefruit[1] [1]: https://www.adafruit.com/product/4333

Seconded. Pick something with wireless connectivity and lots of on-board sensors/LEDs.

Re: CircuitPython: Programming Hardware in Python

#23
post #2

To be fair, this is really mostly just a rebranded MicroPython...

I like to think that MicroPython is more like a base project without a standard hardware library/abstraction layer. CircuitPython took MicroPython and built a hardware abstraction layer on top. It makes hardware level access more standardized and you can take your project to a different microcontroller board. CircuitPython only supports a limited number of boards.

If scripting for microcontrollers become more mainstream, it can enable new applications and use cases that do not require a forced firmware re-flashing to change the code.

Re: CircuitPython: Programming Hardware in Python

#24
post #6
post #2

To be fair, this is really mostly just a rebranded MicroPython...

While yes, its forked from MicroPython, saying it is just rebranded is almost like saying Ubuntu is just rebranded Debian. The biggest difference is how they handle core modules... rather than having a per-port/board they have a common set of core modules. There are also a lot more of those modules and it seems to have a fairly robust set of hardware/boards that are supported. I'll be the first to admit that I don't…

I have played a bit with MicroPython and I had heard of CircuitPython but wasn't across the differences and reasoning behind the fork. Limor actually did the Sunday morning Keynote at the the Linux.Conf.Au conference held over last weekend where she went into into a lot of things that were around repeatability and accessibility especially for novice programmers. The video will have been recorded but yet to be published and I would expect it to be linked from the abstract page [1] soon and/or on the LCA YouTube [2] channel.

[1] https://linux.conf.au/schedule/presentation/122/ [2] https://www.youtube.com/c/linuxconfau/featured

Re: CircuitPython: Programming Hardware in Python

#25
post #9

I've used CircuitPython for one production hardware project which is in the wild. Safe to say that the increased draw on the included battery and higher memory usage weren't a concern here, but they are both significant. Developer productivity is through the roof though. I'd say the biggest pain points for me (unless I'm missing something/they've added more stuff recently) were created by the lack of support for what…

Surprised you didn't use at least MicroPython. I think Python on embedded in general is not great in a production setting, but at least MicroPython has widespread usage; CircuitPython is aimed at being a toy language for beginners.

Re: CircuitPython: Programming Hardware in Python

#26
post #17

What adafruit board would be best for a beginner (at circuit python but long time developer otherwise) dad and his 8 year old kid?

It's not Adafruit (although they make lots of kits for it) but I'd advise the micro:bit v2 (https://microbit.org/new-microbit/)

Re: CircuitPython: Programming Hardware in Python

#27

That’s a very misleading headline. I got the impression this was something akin to VHDL or Verilog or SystemC in python. “Programming Hardware” the way it’s used here is pretty much the same as vanilla python, though I suppose a lot in this industry constantly need reminding of that.

There's MyHDL. Turns Python into a hardware description and verification language: https://github.com/myhdl/myhdl

See also the list from my low-level hardware description language unification idea[1]. There are mostly active projects.

[1] https://github.com/SymbiFlow/ideas/issues/19

Re: CircuitPython: Programming Hardware in Python

#28

That’s a very misleading headline. I got the impression this was something akin to VHDL or Verilog or SystemC in python. “Programming Hardware” the way it’s used here is pretty much the same as vanilla python, though I suppose a lot in this industry constantly need reminding of that.

I don't think there's any merit to your argument here. If the headline had said "designing hardware circuits", that would be another story entirely.

> “Programming Hardware” the way it’s used here is pretty much the same as vanilla python

One can only hope so, since the project is a fork of MicroPython. Neither CPython or MicroPython are meant to be a long departure from Python itself.

Re: CircuitPython: Programming Hardware in Python

#29
post #20
post #17

What adafruit board would be best for a beginner (at circuit python but long time developer otherwise) dad and his 8 year old kid?

from a programming point of view, all are the same. But if you want to introduce your kid to play with sensors and other stuff, I'd get Playground Blefruit[1] [1]: https://www.adafruit.com/product/4333

any add-ons that you’d recommend? or other stuff for kids playing with Python?

maybe an arduino board plus a raspberry pi?

Re: CircuitPython: Programming Hardware in Python

#30
post #23
post #2

To be fair, this is really mostly just a rebranded MicroPython...

I like to think that MicroPython is more like a base project without a standard hardware library/abstraction layer. CircuitPython took MicroPython and built a hardware abstraction layer on top. It makes hardware level access more standardized and you can take your project to a different microcontroller board. CircuitPython only supports a limited number of boards. If scripting for microcontrollers become more mainstr…

Then it should have been a library, not a fork.
Post reply on HN