4 ms·
I used Circuit python in a Raspberry PI Pico. It's ok for prototyping, I would not use it on production. Still recommend using C++, and Platformio for most thi
by major505 4y ago
I used Circuit python in a Raspberry PI Pico.
It's ok for prototyping, I would not use it on production. Still recommend using C++, and Platformio for most things.
But it helped me with quick hacks and proofs of concept.
For example, my company build a laser warning system that would be triggered when someone cut through the laser.
I build a quick remote control to trigger the system without having to get on a ladder and put the hand in front of the laser to diagnose problems.
- nkozyra 4y agoWhat was the downside? Why only prototyping? I've not used a pico but other microcontrollers with c++ interfacing tools, and my thoughts are these things don't have interpreters onboard so the language choice is likely not that important. But I'm limited to TI boards.
- coupdejarnac 4y agoIn general with the the embedded Pythons, they are 2 or 3 orders of magnitude slower than C (big surprise) and they don't support all the hardware features. By necessity, they have a one-size-fits all approach that works fine for hobbyists but might not be sufficient for production. That all said, I love to bang out a prototype or one-off project with CircuitPython or MicroPython. Or Arduino if it makes sense.
- major505 4y agoI never had to do something that could not be done with python. Probably some libs for more exotic hardware, but depending of how you program you can loose events like button presses if you do not consider the slow response time in python.
- temperateregi 4y ago> I never had to do something that could not be done with python. Do you write embedded code professionally?
- major505 4y agoThis days I`m more an android dev. But I do as a side gig. Me and a friend to small projecrts for smartcities like interative propaganda totens, wifi access points, smart traffic warnings. Things like that. I also programed some small scale things in my last to job. One of them was a tamagotchi. I did not filmed the completed version, but I done a video testing the animations: https://youtu.be/fltoTmUJPBE https://youtu.be/fltoTmUJPBE
- deleted 4y ago[deleted]
- nkozyra 4y agoSee I'm surprised Python is not just a convenience that's ultimately transpiled before making its way to the MCU. C++ is high level enough that I always assumed much of that work was already happening for microcontroller work.
- matt_trentini 4y agoThey're slower if you spend cpu-intensive time in the interpreter. If you're calling wrappers for C functions then there's little difference. For example, sending SPI or I2C data are effectively identical. Same too if you want to render a QR code using a C library for example [1]. So if you ever find that you need more performance you can drop into C, write a user module, and get the benefit of easier Python syntax and C performance. The only reason some hardware features aren't supported is a lack of effort to expose those features. Come help us fill in the gaps! :P [1] https://www.youtube.com/watch?v=437CZBnK8vI https://www.youtube.com/watch?v=437CZBnK8vI (Not my best presentation, I'm sorry; I was running on very little sleep and a high degree of stress!)
- coupdejarnac 4y agoI haven't really needed much added to MicroPython or CircuitPython for my use cases, but I see people on r/python or r/iot or wherever gripe occasionally. Thanks for the video link!
- major505 4y agoMostly I'm more experienced with C++. But it all depends of what you need to do with it. Like would I put python in something that someone can get hurt if it dosen't work ? Not. For things like just printing information in a OLED display? Sure, why not. Its easier to mess around with strings in python.
- zoom6628 4y agoOn the website: "CircuitPython is a programming language designed to simplify experimenting and learning to code on low-cost microcontroller boards." That is it in a nutshell. Its a Adafruit fork to conjoin the best of both worlds - adafruits simple boards and python as a easy language with which to get started. or to PoC something quickly.