3 ms·
Neat, but not very practical. To be of any use you still need board support to drive the I2C, SPI, etc which means you have to use C anyhow. You can buy one of
by not_the_fda 6y ago
Neat, but not very practical. To be of any use you still need board support to drive the I2C, SPI, etc which means you have to use C anyhow.
You can buy one of their boards with the BSP but that's over $40, yikes.
To use micropython you need at least an M4 class micro-controller so that a $5 or greater part.
Or you could just stick with C and use a M0 class micro that costs < $1.
A difference of $40 in BOM cost makes it only applicable to the hobbyist. Which is fine, but its just a toy.
- dybber 6y agoIt runs very well on ESP32.
- not_the_fda 6y agoI've done work for a couple of clients, converting a micropython implementation to C on and ESP32, that would disagree with that statement.
- jononor 6y agoIf they need you for that they probably would not have been able to write it themselves in C in the first place?
- matt_trentini 6y agoThe ESP32 port still has a few rough edges, particularly around peripheral control. But it's a popular device and the port is improving all the time.
- embedpythony 6y agoTo be fair, there are BSPs for cheap chips like Espressif microcontrollers and a myriad of minimal development boards. You don't need to buy a pyboard, and part of the reason those are so expensive is because they help fund the project's continued development. But it definitely does have issues with memory usage. Personally, I hope that it will become more viable as its development continues and RAM densities increase. I love the syntax and ease-of-use, but I don't love needing a $10 chip for a $1 task. Hopefully it'll be usable for non-trivial tasks on a $1 Cortex-M23 chip in a few years. It also really shines in educational environments. I see a lot of promise in the progression from MakeCode (primary school) to MicroPython (middle/high school) to programming "real computers" (high school/college). It's a natural progression, and understanding simple microcontrollers takes a lot of the scary "magic" out of learning about complex application processors. See, for example, the BBC micro:bit (which also has a MicroPython BSP).
- jennasys 6y agoOn the boards it has been ported to, I2C and SPI are directly supported (https://docs.micropython.org/en/latest/library/machine.SPI.html https://docs.micropython.org/en/latest/library/machine.SPI.h...). No C coding necessary. It's not a replacement for C on every embedded application, but for prototyping and one-off applications it's hard to beat the productivity gains. It will run on an ESP8266-01 module for as low as $2 ea.
- ChuckMcM 6y agoGoing to disagree here, i2c and spi work fine in micropython. Is it as fast as C? No. Does that mean it's useless? No. The absolute coolest thing is to take a $2 Wemos D1 clone, put micropython on it, hook it to a sensor (I've been using temp and humidity sensors lately) and have it periodically fetch "http://webserver-ip/temp?t=<value>&p=<value>" http://webserver-ip/temp?t=<value>&p=<value>" every 10 seconds and have a little python webserver sitting on an machine on your network that is stuffing the values into influx or some other DB. This is trivial to do, and takes little to no embedded coding experience on the ESP8266. That's a win as far as I am concerned.
- sitkack 6y agoNot only that, but you can live code in the repl on the same device. One can solve a physical problem in less than 15 minutes using these devices.
- dcmorton 6y agoI've done something pretty similar that with my project here [0]. Instead of using MQTT the ESP32 feeds directly to an InfluxDB database. [0] - https://github.com/dcmorton/esp32-dht22-upython https://github.com/dcmorton/esp32-dht22-upython
- dnr 6y agoHuh? I use MicroPython on ESP8266's that I'm sure are way under $5 in bulk these days. Including I2C support and various other stuff, without writing any C. I am a hobbyist but I don't see any reason why the same thing wouldn't work in a commercial product.
- fxj 6y agoLook into ArduPy, which lets you compile arduino libs as loadable python modules: ArduPy is a combination of Arduino and MicroPython. MicroPython uses the universal Arduino API to control the hardware so that it can be compatible with new platforms quickly. With the help of the aip package manager we provided, you can transform your favorite Arduino library into a MicroPython library. https://github.com/Seeed-Studio/ArduPy https://github.com/Seeed-Studio/ArduPy It works very well on the Seeeduino XIAO (https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcont...) which is arduino compatible and costs $4,90 per piece. You can even get a grove shield for the same price and you are ready to go.