6 ms·
Microdot: A Web Framework for Microcontrollers
- synergy20 3y agoMicropython is using python 3.4 and it does take more storage space than compiled language when you pull in its modules etc. I would think Lua or even C based web framework for MCU and restricted embedded boards will be a lot more resource efficient. Typically you can just run a few cgi scripts with bootstrap as the UI and jquery as the javascript, but a simple MVC will be really cool.
- kaycebasques 3y agoSo the entire Microdot web framework is also intended to run on-device? I didn't grok that on my first readthrough
- synergy20 3y agoI think so, otherwise what's the point to call it Microdot.
- kaycebasques 3y agoYeah, I was thinking of something that integrates closely with MicroPython (maybe run the server on RPi and drop a small Microdot comms lib on the device) but it makes a lot more sense to just run everything on-device, given that it's targeting the MicroPython userbase
- kaycebasques 3y agoLooks great. Not sure how apples-to-apples this comparison is [1] but my team has a similar product, pw_web, a Node.js lib that lets you communicate with embedded devices over RPC: https://pigweed.dev/pw_web/ https://pigweed.dev/pw_web/ I'm curious to hear what other similar products are out there that others are using? Edit: Sounds like Microdot runs the entire web framework completely on-device? My initial understanding was wrong in that case; it's an apples-to-oranges comparison [1] It seems like Microdot handles more of the stack and is probably more hobbyist-friendly based on the fact that it targets MicroPython. Or maybe it's just better all-around; I haven't tried MicroPython so I can't compare.
- thomasqbrady 3y agoLooked in several places, but I can’t figure out exactly what sort of microcontroller they aim to support… are we talking ATmega? ESP32? ARM Cortex M? All of those?
- eichin 3y agoPresumably "anything that micropython (or circuitpython) does" which is vast range. https://github.com/miguelgrinberg/microdot/tree/main/src/microdot https://github.com/miguelgrinberg/microdot/tree/main/src/mic... is just python code...
- chrsw 3y agoInteresting. Is there a similar micro- or nano- web framework like this but in C?
- voakbasda 3y agoI hate to be that guy, but I've been writing embedded systems using microcontrollers for decades. The movement to put Python on them makes me cringe. I understand making them more approachable for developers at a higher level, but the resulting solutions need an order of magnitude more resources to accomplish the same tasks when compared to writing an equivalent system in C. Assuming these kinds of tools are being used temporarily for proof-of-concept, I think that it is a great fit; however, we all know that there's nothing more permanent than a temporary solution.
- jstanley 3y agoI'm personally not interested in MicroPython either, but... > the resulting solutions need an order of magnitude more resources to accomplish the same tasks when compared to writing an equivalent system in C. I mean, yeah... but that's true when you're writing Python code on a normal computer as well. It's not really an argument against writing Python except in cases where you're actually running into resource constraints. If you can get the resources you need in a microcontroller you can afford, and you prefer programming in Python... why not?
- bemusedthrow75 3y ago> If you can get the resources you need in a microcontroller you can afford, and you prefer programming in Python... why not? Particularly when you consider that the "bloat" here has no secondary side-effects: it doesn't waste resources that other software could be using, because no other software is running. I am a long-time web developer who has always intellectually understood the interest in microcontrollers but never had much of the need. I do now. I'm not even a fan of Python but MicroPython is a surprisingly productive development experience and I've learned a lot in a very short time with a Pico W. I will probably use TinyGo at some point in the future, particularly as I try to use smaller devices, and I'm not averse to porting to C, but I really rate the MicroPython ecosystem highly in terms of actual coverage, though mainly just the intent of it, which is unimpeachable IMO.
- AzuraIsCool 3y ago
- bemusedthrow75 3y agoQuick honourable mention for Pimoroni's similar tiny framework, phew: https://github.com/pimoroni/phew https://github.com/pimoroni/phew and this rather clever start-as-access-point-to-join-network scheme implemented on it: https://github.com/simonprickett/phewap https://github.com/simonprickett/phewap which works a treat!
- dang 3y agoMicrodot: A web framework for microcontrollers - https://news.ycombinator.com/item?id=39111276 https://news.ycombinator.com/item?id=39111276 - Jan 2024 (1 comment) Microdot: Yet another Python web framework - https://news.ycombinator.com/item?id=38834156 https://news.ycombinator.com/item?id=38834156 - Jan 2024 (26 comments) Microdot - https://news.ycombinator.com/item?id=38156060 https://news.ycombinator.com/item?id=38156060 - Nov 2023 (26 comments)