5 ms·
In 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
by coupdejarnac 4y ago
In 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!