Search found 32 matches

by fdushin
Wed Feb 14, 2018 7:30 pm
Forum: ESP8266 boards
Topic: ESP8266/ESP32 neopixel 16x16 display drive
Replies: 1
Views: 2289

Re: ESP8266/ESP32 neopixel 16x16 display drive

Cool. I made a night/morning/wakeup light using an array of 9 neopixels (hand-soldered). Code is at https://github.com/fadushin/esp8266/tree/master/micropython/neolamp Observations: I had to power the Neopixels off 3.3v, on account of a large voltage difference between the 5v power supply and the 3....
by fdushin
Wed Jan 03, 2018 12:29 pm
Forum: ESP8266 boards
Topic: how can non-blocking socket instances be implemented
Replies: 14
Views: 65160

Re: how can non-blocking socket instances be implemented

Here is another example of a generic TCPServer using uaysncio: https://github.com/fadushin/esp8266/blob/master/micropython/uhttpd/uhttpd/__init__.py#L354 (though I am having issues with uasyncio later than v1.3) I have found usasyncio the best way to do cooperative multi-tasking in micropython. Here...
by fdushin
Mon Sep 25, 2017 11:09 am
Forum: ESP8266 boards
Topic: Initial Setup via AP
Replies: 8
Views: 10611

Re: Initial Setup via AP

This was part of the motivation for the web-console [1] prototype I used to drive the implementation of uhttpd. The problem I ran into was that due to some issues I have yet to resolve with uhttpd, I was unable to load the set of HTML, CSS, and Javascript files in parallel (modern web browsers will ...
by fdushin
Wed Sep 06, 2017 7:40 pm
Forum: ESP8266 boards
Topic: How to send image (.jpg, .gif etc) from esp8266 webserver
Replies: 8
Views: 12111

Re: How to send image (.jpg, .gif etc) from esp8266 webserver

There are likely many solutions out there already. Feel free to try, for example,

https://github.com/fadushin/esp8266/tre ... hon/uhttpd

It is designed more for REST-ful web applications, but it does have a file server module.
by fdushin
Sun Mar 19, 2017 11:46 pm
Forum: ESP8266 boards
Topic: multitasking services
Replies: 3
Views: 4265

Re: multitasking services

For a while I tried using some undocumented callbacks in the socket interface to allow server sockets to accept connections in the background [1]. This proved to be unworkable except in the most trivial cases, so I moved to using uasyncio , and the results are much better. -Fred [1] https://github.c...
by fdushin
Thu Mar 16, 2017 8:31 pm
Forum: ESP8266 boards
Topic: mpy-cross not making files smaller
Replies: 11
Views: 11832

Re: mpy-cross not making files smaller

I'd still recommend burning your code to an image, if you want to really keep the memory image down. For large applications, I have found that I need to do that, in order to not run out of memory at runtime.
by fdushin
Tue Feb 21, 2017 9:50 pm
Forum: ESP8266 boards
Topic: Despite copying a new one, old main.py is operational
Replies: 15
Views: 12860

Re: Despite copying a new one, old main.py is operational

Using the webrepl console, try f = open('main.py') print(f.read()) f.close() and verify the file has the contents you expect it to have. (I have found that using webrepl will wrap the output, making long lines possible to read, whereas minicom will not. YMMV if you are using a different serial proto...
by fdushin
Tue Feb 21, 2017 3:22 pm
Forum: ESP8266 boards
Topic: Including libraries in the built image
Replies: 1
Views: 2759

Re: Including libraries in the built image

Copy or symlink the modules you want to include into: <path-to-micropython-dir>/esp8266/modules You can copy or link whole packages (e.g., .../modules/uasyncio/__init__.py, etc) and they will get compiled into the image. Note that you may run out of space if you add too many modules. I have not work...
by fdushin
Sun Feb 19, 2017 4:06 pm
Forum: ESP8266 boards
Topic: Simple HTTP framework
Replies: 25
Views: 28351

Re: Simple HTTP framework

I have started a port of the uhttpd server to @pythoncoder's new uasyncio framework. The work is on a branch, but it can be found at: https://github.com/fadushin/esp8266/tree/asyncio/micropython/uhttpd I am still getting some failures with my concurrency unit tests -- I still get intermittent [Errno...
by fdushin
Fri Dec 30, 2016 2:56 pm
Forum: ESP8266 boards
Topic: Simple HTTP framework
Replies: 25
Views: 28351

Re: Simple HTTP framework

@Roberthh that makes a lot of sense. I will start an investigation of porting the existing codebase to use asyncio, likely on a branch off master. In the meantime, I will add a limitation to the current README, to let people know. If anyone is willing to collaborate, please let me know. Does anyone ...