Search found 62 matches
- Wed Jan 04, 2017 7:42 pm
- Forum: General Discussion and Questions
- Topic: POST on HTTP Server
- Replies: 7
- Views: 8574
Re: POST on HTTP Server
It is easy enough to do, you will probably want to check the Content-length header (maybe reject posts that don't have it). If the POST is small enough to fit in ram, then it's no problem. Otherwise, you'll need to read it in chunks and parse out. I've implemented HTTP file upload with PUT, because ...
- Sun Nov 13, 2016 8:20 pm
- Forum: General Discussion and Questions
- Topic: Remove imported module from RAM
- Replies: 62
- Views: 49296
Re: Remove imported module from RAM
As far as I've been able to tell, the memory is released if you delete it from sys.modules and also remove any other references to it (then call gc() if you want) I didn't know about those "interned strings" though. If we delete a module, then import it again later, does it leak? (I don't know the a...
- Thu Nov 10, 2016 10:55 pm
- Forum: ESP8266 boards
- Topic: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
- Replies: 76
- Views: 60202
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
Oh dear. (I posted the bug that started this. Sorry.) I really, really, didn't plan on starting this "Holy War". Please take a chill pill (or two). For my part, I'd be happy with any reasonable solution which allows connecting / disconnecting without wearing the flash. If it's backwards-compatible, ...
- Wed Nov 02, 2016 3:27 pm
- Forum: ESP8266 boards
- Topic: Downloading 1GB of data with MicroPython ESP8266 port
- Replies: 26
- Views: 27056
Re: Downloading 1GB of data with MicroPython ESP8266 port
That is very interesting. I have noticed that the new build of Micropython with the new firmware runs my "stumbler"-type application much more robustly than the previous one. There were some cases where it would crash inside scan(), which I could never figure out. Now it appears that scan() crashes ...
- Mon Oct 31, 2016 9:13 pm
- Forum: ESP8266 boards
- Topic: What makes WiFi config persistent?
- Replies: 6
- Views: 6485
Re: What makes WiFi config persistent?
The API provided by the espressif firmware does this automatically when you call the function to set the config. There is a second function which does not save the config, there is a big discussion in this pull request: https://github.com/micropython/micropython/pull/2510 On how / whether to use it.
- Sun Oct 16, 2016 9:58 pm
- Forum: ESP8266 boards
- Topic: RFC: Not enabling WebREPL by default on boot in 1.8.6
- Replies: 21
- Views: 20699
Re: RFC: Not enabling WebREPL by default on boot
I honestly think that enabling webrepl (even without any suggestion of a password) is not a problem. Micropython is not intended as an end-user product; access will only ever be viable for those in limited wifi range. And anyone who flashes their ESP board with Micropython, we can reasonably expect ...
- Thu Oct 13, 2016 10:45 am
- Forum: Hardware Projects
- Topic: Sound spectrum analysis, adverse harmonic tones, micropython, adafruit, fft
- Replies: 2
- Views: 5785
Re: Sound spectrum analysis, adverse harmonic tones, micropython, adafruit, fft
Not exactly, but I did something similar with a Rapsberry Pi and a cheap USB microphone. The resulting configuration was not pretty, but it worked. I used Python (obviously) and the Numpy FFT library. I used the "arecord" program to read sound samples from the device in the desired format and pipe i...
- Sun Oct 09, 2016 10:30 pm
- Forum: ESP8266 boards
- Topic: Question about allocating memory in interrupts
- Replies: 10
- Views: 8454
Re: Question about allocating memory in interrupts
If the function check_msg simply returns a reference to an already-allocated buffer, then it won't need to allocate, right?
Mark
Mark
- Thu Oct 06, 2016 9:55 pm
- Forum: ESP8266 boards
- Topic: 'module' object has no attribute 'IPPROTO_UDP'
- Replies: 3
- Views: 5133
Re: 'module' object has no attribute 'IPPROTO_UDP'
You can omit the final parameter. In any case, its default value of 0 is usually the only possible value. In particular, I don't think Micropython supports more than one protocol per type. The "protocol" parameter is normally only needed for unusual types of sockets, for example, if using raw or udp...
- Wed Oct 05, 2016 8:00 pm
- Forum: ESP8266 boards
- Topic: socket accept() does not (always) accept
- Replies: 2
- Views: 3139
Re: socket accept() does not (always) accept
That sounded really plausible, however, I've increased it to 5 and it made no difference at all.