Search found 62 matches

by markxr
Wed Oct 05, 2016 1:00 pm
Forum: General Discussion and Questions
Topic: Resetting bytearray
Replies: 13
Views: 13622

Re: Resetting bytearray

I used:

Code: Select all

tempbuf = bytearray() 

# ...

tempbuf[::] = b''
Is that ok, or not?
by markxr
Wed Oct 05, 2016 12:56 pm
Forum: ESP8266 boards
Topic: socket accept() does not (always) accept
Replies: 2
Views: 3165

socket accept() does not (always) accept

Hi, I've written a (HTTP 1.0) web server which will have various features, for the esp8266 running in Micropython (1.8.4 actually the latest built) This is all running perfectly most of the time, but there is a case where it isn't. If a web browser opens two sockets at once, perhaps a second one bef...
by markxr
Tue Oct 04, 2016 9:49 am
Forum: General Discussion and Questions
Topic: Real-life application using micropython
Replies: 9
Views: 6170

Re: Real-life application using micropython

200ms sounds like quite a long time to write a small file, I think it should be doable. Robustness is a bigger problem. Writing a file to the (DOS) filesystem needs at least to update the directory entry, the fat and the file itself. This is three writes which might not all succeed if the power fail...
by markxr
Mon Oct 03, 2016 12:53 pm
Forum: ESP8266 boards
Topic: Loading and unloading a module dynamically at runtime
Replies: 4
Views: 5347

Loading and unloading a module dynamically at runtime

Hi, I'm wondering if it's possible to workaround the small amount of RAM, by loading, then unloading several modules at runtime. Then I can write more code than can fit in memory. For example, if I have some pseudo-code which uses import sys # .... exec('import modtest', {} ) # Instead of globals, u...
by markxr
Wed Sep 28, 2016 10:11 pm
Forum: ESP8266 boards
Topic: Server for basic setup
Replies: 11
Views: 13272

Re: Server for basic setup

Thanks a lot, I'll try it at home. Is your miniservet able to handle POST and GET vars? Unpacking form-encoded data is a problem, because there is very little ram and form posts can get big. That's why I don't use multipart/form-data POSTs, and just use PUT instead (client-side JS deals with it). I...
by markxr
Wed Sep 28, 2016 3:43 pm
Forum: ESP8266 boards
Topic: Server for basic setup
Replies: 11
Views: 13272

Re: Server for basic setup

I have written a web server for the ESP8266 which allows upload / download files, serves images, css and Javascript code, it's still in development, but code is here: https://github.com/MarkR42/esp-webui Memory limitations are the real problem, but I can stream upload / download files as big as you ...
by markxr
Wed Sep 21, 2016 8:36 pm
Forum: ESP8266 boards
Topic: ESP01 MicroPython install
Replies: 46
Views: 56586

Re: ESP01 MicroPython install

If you have 512k flash, then there won't be enough room for a filesystem, so I suppose, we should build a version of Micropython for the ESP8266 without the filesystem and that may save enough space to fit in 512k? Of course you then need to store your app in the scripts/ directory to be built with ...
by markxr
Mon Sep 19, 2016 1:57 pm
Forum: ESP8266 boards
Topic: Using the tx/rx pins not for UART
Replies: 42
Views: 48194

Re: Using the tx/rx pins not for UART

Ideally we would be able to redirect the repl to /dev/null, and still connect over webrepl (if enabled), but then use rx/tx for something else. I don't think we can prevent the firmware and bootloader spitting out rubbish at 75k baud at boot-time, but that only affects tx (and some rubbish comes out...
by markxr
Fri Sep 16, 2016 9:39 pm
Forum: ESP8266 boards
Topic: Previous month in ESP8266 port development...
Replies: 5
Views: 5663

Re: Last month in ESP8266 port development...

This wifi .scan() bug was really weird, I will check if my applications work better after this fix.
by markxr
Tue Sep 13, 2016 4:17 pm
Forum: ESP8266 boards
Topic: Reset codes
Replies: 3
Views: 5065

Re: Reset codes

Yes, 2= crash :)

I've seen it multiple times.

Usually what I do is check the reset code, and try to start up more quickly if it was a crash, but put a delay for normal reset or power on, to give the user time to press ctrl-C