4 ms·
I heard the Lua implementation in NodeMCU/ESP8266 is not good for "anything serious", that's why C is still the way to go (or at least use Arduino 'API', https:
by wiradikusuma 11y ago
I heard the Lua implementation in NodeMCU/ESP8266 is not good for "anything serious", that's why C is still the way to go (or at least use Arduino 'API', https://github.com/esp8266/Arduino https://github.com/esp8266/Arduino). How will Micropython be be better?
- vvanders 11y agoThat kinda surprises me a bit, I'd figure if any interpreted language would work on embedded it'd be Lua. Back when I was in games we ran the whole AI for a PSP game in an single 400kB block and it worked fantastically.
- pfalcon 11y agoIf you think that Lua is good for that, you'd be surprised how MicroPython is good - it's written purposedly for microcontrollers. And Lua was written for "desktop" scripting and found its stronghold in gaming industry. Its usage on deeply embedded systems is attempt at downscaling. Which works. How well?.. MicroPython can work in 128K of "ROM" (80K for language core, rest for modules/user code). In 400K, you can do a lot with it.
- robert_foss 11y agoI think MicroPython has a really good clean codebase, more so than NodeMCU. But NodeMCU has been getting a lot better in that respect the past few months, and now has a solid foundation. The current MicroPython support for the ESP8266 platform is very basic, albeit good. I would love to see broader hardware support for the ESP8266 on MicroPython. I guess the real question is which of these project will support both ESP32 and ESP8266. Full disclosure: I'm a NodeMCU contributor
- pfalcon 11y agoI appreciate your comment. I keep an eye on other projects' progress, and I agree that few last months were active in ESP8266 community. Is my observation right that many changes in NodeMCU (finally upgrading from 0.9.6, switching from Lua to eLua) happened after original Chinese guys creators of the projects stepped back and let "western" guys do more maintenance? Regarding hardware support in MicroPython (first hardware protocols, the specific hardware devices), it's coming - Damien did a lot of work on that preparing to the Kickstarter, and some of it already seen in the KS video. Mind that MicroPython runs on many platforms, and providing portable and consistent API is one of our top goals. And that requires good design work, from many people (to cover different usecases and PoVs), and that takes time and committee-stuff ;-). But we now have solid foundation, so further progress is imminent. All in all, we always welcomed contributors (and have almost 100 of them), and exactly want to reach critical mass of functionality for ESP8266 port, so it made good sense to come by and contribute gazillion of smaller things people want ;-). So, please keep watching our space! Regarding ESP32 - one of my concern is to avoid typical situation of moving target, when software never works well enough, with constant promises that next generation of hardware resolves it, but vicious cycle only repeats. Otherwise, I guess it's fair to say that all active projects are going to support ESP32 too!
- pfalcon 11y agoDepends on what you consider "serious". You can watch a Kickstarter video, at least the beginning. A gadget which shows you weather. Is it serious? I dunno. But I find it useful. Well, perhaps I don't need to know weather in Tokyo if I'm too far away from it. Just knowing meteo report for my area, and actual temperature outside would be good. But wait, if I have an upcoming trip to Tokyo, I'm actually interested in weather in Tokyo during next couple of weeks. Easy customization and changes like that (literally, "on spot") is the biggest selling point of scripting languages. Can you do it in Arduino? Yes, you can. Arduino is kind of subset of C++ to make it more like scripting language, but still compiled (because AVR microcontroller used in the original Arduino couldn't host an advanced scripting language, but people didn't care even back then, and wanted to run it nonetheless: https://github.com/billroy/bitlash https://github.com/billroy/bitlash). So, just keep that compiler/IDE around (on your tablet? phone?) if you want to tweak it. Is it big problem? Nope, but should give an idea why people look towards scripting languages which allow to have even less problems. How MicroPython will be better? Well, we seriously consider Python to be more advanced language overall (while more suited for hardware programming). And I'm a long-time esp8266 hacker with bunch of ideas how to get more from the chip, just looking for a good excuse (like, people actually needing it) to implement them.