New *early access* mp-esp8266-firmware-vXY.bin on ESP8266

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

Post by deshipu » Fri Mar 18, 2016 10:46 am

That is normal. GPIO16 is special and very limited, anything more advanced won't work with it.

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

Post by kfricke » Fri Mar 18, 2016 10:51 am

To fill in some more details... GPIO16 is the pin which can be connected to RST (Reset) to enable the RTC co wake the module up from deep sleep.

mianos
Posts: 84
Joined: Sat Aug 22, 2015 6:42 am

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

Post by mianos » Fri Mar 18, 2016 10:12 pm

As said, it uses a different register setup.
In my port it works fine as an output (it is connected to an LED on some of my boards).
The guys just added support for it in the main branch as a special case last week so I'm sure it will start working soon.

User avatar
thoralt
Posts: 11
Joined: Wed Jul 02, 2014 11:22 am
Location: Germany

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

Post by thoralt » Sun Mar 20, 2016 5:16 pm

I did some more testing of the Neopixel module. I used the module with the pyBoard before and it was driving my word clock (114 WS2812B LEDs) really stable. Now I moved parts of the code to the ESP8266 and there are some glitches in the signal. My code is calling NeoPixel.write() with constant data in a tight loop. Only a few LEDs are on and most LEDs are off.

Unfortunately, LEDs are flickering. Approximately 10 times per seconds something in the data transmission goes wrong and single LEDs are showing a short flash of wrong color. I used the scope to check the timing, and here are my findings:

Normal pause between complete data packets: around 200 us
DS1Z_QuickPrint4.png
DS1Z_QuickPrint4.png (58.25 KiB) Viewed 8826 times
Irregular pause inside data packets: around 14 us
DS1Z_QuickPrint5.png
DS1Z_QuickPrint5.png (64.84 KiB) Viewed 8826 times
Another sample of irregular pause right before the end of the data stream
DS1Z_QuickPrint7.png
DS1Z_QuickPrint7.png (54.33 KiB) Viewed 8826 times
As seen in the screenshots, some of the data packets are interrupted by short pauses of 14...16 us. As I read, normally 50 us are required to reset the WS2812B and mark the end of a data stream so I wonder if this short pause could be the cause of the flickering LEDs. Can somebody explain these short pauses? Did anybody else run a greater number of WS2812B using the ESP8266?

Thoralt

hamish
Posts: 3
Joined: Fri Mar 18, 2016 11:56 am

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

Post by hamish » Mon Mar 21, 2016 8:54 pm

I have compiled micropython from git, but when its runs I get this.

[code]
MicroPython v1.6-242-g2b302da-dirty on 2016-03-20; ESP module with ESP8266
Type "help()" for more information.
>>> #5 ets_task(401004e8, 3, 3fff89e4, 16)
ets_alt_task: ets_run
q for task 3: queue: 3fff89e4, get ptr: 0, put ptr: 0, qlen: 16
q for task 20: queue: 3ffef740, get ptr: 0, put ptr: 0, qlen: 3
q for task 28: queue: 3fff9750, get ptr: 0, put ptr: 0, qlen: 10
q for task 29: queue: 3fff9818, get ptr: 0, put ptr: 0, qlen: 10
q for task 31: queue: 3ffee9f0, get ptr: 0, put ptr: 1, qlen: 4
q for task 32: queue: 3ffef9b0, get ptr: 0, put ptr: 1, qlen: 34
====
help()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name not defined
>>> a = 1
>>> print(a)
1
>>> for i in range(5):
... print(i)
...
Traceback (most recent call last):
File "<stdin>", line 2
SyntaxError: invalid syntax
>>>
[/code]

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

Post by deshipu » Tue Mar 22, 2016 12:08 am

That looks about correct. Don't forget to indent the body of the loop.

hamish
Posts: 3
Joined: Fri Mar 18, 2016 11:56 am

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

Post by hamish » Tue Mar 22, 2016 9:21 am

is neopixel on the current git ?
I get

>>> import neopixel
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: module not found



Importing other things seems to work ok.

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

Post by platforma » Tue Mar 22, 2016 11:18 am

Hi hamish,

Please see the first "Please Note" section here: http://forum.micropython.org/viewtopic.php?f=16&t=1655
Neopixel module is a part of the alpha firmware only, but will be eventually added to the main repo.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by pfalcon » Wed Mar 23, 2016 2:59 pm

Photon Peddler wrote: A question: It seems that MicroPython stores the ESSID and password somewhere, so that the module can reconnect after a reset. Is there a way to erase this information, so that I don't leak the network name and password when loaning the module to someone else?
MicroPython itself doesn't store them, but that's exactly what the underlying vendor SDK does. The most bullet-proof way to deal with this is to completely erase flash (and reprogram uPy if needed) before handing out your device (esptool.py erase_flash).
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: New mp-esp8266-firmware-v01.bin on ESP8266

Post by pfalcon » Wed Mar 23, 2016 3:22 pm

platforma wrote: It's good to see the filesystem built in now! The first thing I issued on the repl (out of habit now), is "import boot_", which immediately resulted in:

Code: Select all

FAT filesystem appears to be corrupted. If you had important data there, you
...
So, we chickened out a bit to enable filesystem by default in early-v1, because well, if something goes wrong, user may easily miss error messages and will have only "it doesn't work" with no other details to report back. So, we made it require explicit "import boot_", and that kinda helped, based on the reports above. early-v2 however does "import boot_" automagically on boot, so you don't need to do it manually. The whole process is something to work out better however (as the name "boot_" suggests, it's just a temporary hack), so there may be further changes.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

Locked