CircuitPython: Programming Hardware in Python
61–70 of 87 posts
Re: CircuitPython: Programming Hardware in Python
#62Earlier quoted context omitted.
"Developer productivity is through the roof though." I learned Python after I learned C, C++, Java, Scala, Rust and a few others. I fail to see my productivity going through the roof with Python. It's quite the opposite. Writing initial code is fast, but making it work well - not so much.
Presumably the parent is comparing Python to C. There’s no way anyone is more productive in C than in Python.
I appreciate C and I’ve learned a lot of things like peripheral clock multipliers and all the work that has to be done before you can even jump to main. However, I set out to make an altimeter heh.
Edit: oh and with C, writing your own device driver for every single thing is a pit of a pita too. There are open source drivers for some breakouts but they all seem to require serious hand fitting.
Re: CircuitPython: Programming Hardware in Python
#63Earlier quoted context omitted.
Presumably the parent is comparing Python to C. There’s no way anyone is more productive in C than in Python.
I’ve been working on altimeters for model rockets using both C and Micropython on Adafruit’s feather series and a couple other boards. The thing with C is the tool chain setup is 3/4 the battle. It’s a huge LOE to go from nothing to a blinking led (the embedded hello world) with C. With micropython it’s 5 lines, drag/drop a file, and reboot. I appreciate C and I’ve learned a lot of things like peripheral clock multip…
Re: CircuitPython: Programming Hardware in Python
#64My take on Micropython is that it is a small community with just a handful of long term dedicated contributors. It is a little rough around the edges, especially when you get into the details of board support other than the pyboard. For example I had issues with interrupts interacting with Python threads in the web sockets library. The documentation was flat out wrong and I had to figure things out on my own.
I ordered a couple accessory boards off Amazon, a high precision ADC and a real time clock. Both were fakes. They had swapped out chips with lower grade components. When I ordered from Adafruit I got the real things.
The big downside of the Circuit Python fork is that Adafruit deprecated their Micropython libraries for their boards. That seems like it will have long term impact to Micropython.
Re: CircuitPython: Programming Hardware in Python
#65CircuitPython is a toy language made for running on Adafruit's halloween/cosplaying gadgets. It doesn't even support interrupts. Better use Micropython.
What I don’t understand is: what features of Python encourage its use in embedded systems in the first place? Why not F# or Elixir?
Re: CircuitPython: Programming Hardware in Python
#66I recently built a project on an ESP32 using Micropython. My project had a web application using web sockets and there were good libraries in Micropython. My take on Micropython is that it is a small community with just a handful of long term dedicated contributors. It is a little rough around the edges, especially when you get into the details of board support other than the pyboard. For example I had issues with in…
sort of off topic, but, I never buy anything from Amazon anymore unless it's a last resort. The convenience is no longer there if I end up having to send stuff back due to it being fake or damaged in shipping (particularly books that are put in large boxes with no packing material, which is sucky given Amazon used to be the primary way I'd buy books).
I'm excited to give MicroPython a try with the new Raspberry Pi 2040 microcontroller. I have a couple project ideas lined up and really looking forward to getting into this space a little as a hobby.
Re: CircuitPython: Programming Hardware in Python
#67To be fair, this is really mostly just a rebranded MicroPython...
For most non-programmers (which is the target) support is much more important than issues with forks or OSS politics.
Re: CircuitPython: Programming Hardware in Python
#68That’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.
CPython IS the normal Python you get from python.org, It's only ever called CPython when discussing it in the context of other pythons like MicroPython, PyPy, Jython, etc.
Re: CircuitPython: Programming Hardware in Python
#69I wish these technologies were around when I was a kid.
Re: CircuitPython: Programming Hardware in Python
#70Their documentation is rather poor. Parameters to function/constructors are often left out, leaving you to go through the source to figure out how stuff works.
The standard modules can have different functions/variables between different boards. It makes sense since some boards have capabilities others don't. However there is no documentation on this.
Finally, in my opinion, some of the adafruit_* libraries are not well designed. There are many "kitchen sink" libraries that try to do everything. I also noticed that while they do appear to use pylint to enforce good standards, almost all source files have at least one check disabled...