MicroPython on ESP8266 Kickstarter

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: MicroPython on ESP8266 Kickstarter

Post by kfricke » Thu Mar 03, 2016 3:39 pm

Yes, Damien said that the ESP port will fully support floating point.

mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: MicroPython on ESP8266 Kickstarter

Post by mad474 » Thu Mar 03, 2016 3:44 pm

kobertkirk wrote:When can we expect floating point operations to be added?
I've seen appropriate commits on github, last one yesterday. : https://github.com/micropython/micropyt ... its/master
Didn't run any tests though. Still fiddling with the toolchain.

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

Re: MicroPython on ESP8266 Kickstarter

Post by pfalcon » Thu Mar 03, 2016 4:29 pm

Guys, I'd like to remind that the official release is in 2 months, so that's the best answer to questions "when feature X will be available" (of core features, stretch-goal features will take more time after that).

With that reminded, we started to spool source code to the master branch - while, as KS updates says, taking a chance to refactor and clean up it. To give you an idea, UART REPL handling went thru 3 incarnations. The original socket module is one I quickly put up 1 year ago (sic!) to test my idea of how to have BSD-compatible sockets on top of lwIP (without bringing in a full-fledged RTOS). I then spent quite a time discussing this idea with other ESP8266 hackers inviting them to see where my reasoning is wrong and why it can't work, but nobody was interested. I'm grateful to GalenHZ who accepted the challenge and developed fully independent implementation based on these ideas, to prove its viability. Well, we started with my module still as known-working, and then gradually switched to GalenHZ's modlwip, discovered and fixed bunch of issues with it and added more features (few fixes are already in the mainline, as it's a chore to keep them in a separate branch). Do we need 3 REPLs and 2 socket modules? Apparently no. When someone submits questionable code, I'm the first to suggest: "This code looks like one we can add, and then soon remove again, then why, please do it right". Then the only choice is to apply the same treatment to our own code, and uphold the high testimonies MicroPython already received for its code quality.

Another point - new ESP8266 port depends on other components, first of all esp-open-sdk. There're bunch of changes to do to it too to make port easily buildable (while we just did multi-step manual setup, which for sure will be error-prone to many people). I've just added https://github.com/pfalcon/esp-open-lwip as a submodule to esp-open-sdk, yet need to integrate it completely into build process. And over last month, there was already bunch of changes to it, so if you didn't rebuild for awhile, I suggest you rebuild it from scratch (make clean; make). Then be ready to rebuild it again as it progresses.

But again, source is getting there. If you posses required skills, we welcome you to build, run, test it. Automated testsuite support is one of the biggest change the project brings - now we know that there're not just features, but that they actually work (or will work soon; or eventually). Floating points support works great for us, with small caveat - there's slightly less precision than on PyBoard, to accommodate less memory and lack of HW FP on ESP8266. Try it ;-)
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/

cpr
Posts: 11
Joined: Thu Mar 03, 2016 4:56 pm
Location: LDK, OWL @ .de

Re: MicroPython on ESP8266 Kickstarter

Post by cpr » Thu Mar 03, 2016 5:02 pm

Hi!

Just registered as a backer, and want to say that I will patiently :mrgreen: await the outcome!

mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: MicroPython on ESP8266 Kickstarter

Post by mad474 » Sat Mar 05, 2016 11:07 am

pfalcon wrote:Try it ;-)
Done! Running
MicroPython v1.6-136-g98b727c on 2016-03-05; ESP module with ESP8266
on an "old" ESP8266 ESP-01.
Image
https://youtu.be/tlZ4FiQR5U0

You guys really rock! Thanks!

User avatar
andreagrandi
Posts: 16
Joined: Fri Feb 05, 2016 6:48 pm
Contact:

Re: MicroPython on ESP8266 Kickstarter

Post by andreagrandi » Sat Mar 05, 2016 12:40 pm

mad474 wrote:
pfalcon wrote:Try it ;-)
Done! Running
MicroPython v1.6-136-g98b727c on 2016-03-05; ESP module with ESP8266
on an "old" ESP8266 ESP-01.
Image
https://youtu.be/tlZ4FiQR5U0

You guys really rock! Thanks!
out of curiosity, did you use OSX or Linux to build the stuff? I tried yesterday with OSX but I struggled compiling the toolchain and I gave up.

User avatar
Frida
Posts: 45
Joined: Sat Jan 30, 2016 2:20 pm
Location: Middelfart, Denmark

Re: MicroPython on ESP8266 Kickstarter

Post by Frida » Sat Mar 05, 2016 2:02 pm

Code: Select all

MicroPython v1.6-128-g5788499 on 2016-03-05; ESP module with ESP8266
Type "help()" for more information.
>>> 2+4
6
>>> help()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name not defined
>>> import pyb
>>> pyb
<module 'pyb'>
>>> dir(pyb)
['__name__', 'info', 'freq', 'millis', 'elapsed_millis', 'micros', 'elapsed_micros', 'delay', 'udelay', 'sync', 'hard_reset', 'Pin', 'ADC', 'RTC']
>>> help(pyb)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name not defined
>>> 
First download on a esp8266-01 today.
Downloaded on linux and compile without problems.
Yes Frida is my watchdog!

electronicsguy
Posts: 7
Joined: Thu Oct 22, 2015 1:22 am
Contact:

Re: MicroPython on ESP8266 Kickstarter

Post by electronicsguy » Sun Apr 17, 2016 5:58 pm

Frida wrote:

Code: Select all

MicroPython v1.6-128-g5788499 on 2016-03-05; ESP module with ESP8266
Type "help()" for more information.
>>> help()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name not defined
>>> 
First download on a esp8266-01 today.
Downloaded on linux and compile without problems.
I have the same problem as frida. Downloaded the pre-compiled firmware from Adafruit and flashed it onto ESP-01. NameError as above, for any command.

User avatar
Frida
Posts: 45
Joined: Sat Jan 30, 2016 2:20 pm
Location: Middelfart, Denmark

Re: MicroPython on ESP8266 Kickstarter

Post by Frida » Sun Apr 17, 2016 7:57 pm

@electronicsguy
I'm using the one from github, and not that one from Adafruit.
If you look, it can 2+4=6, it was only the help that is not working yet.
Wait till they are ready to release the first version to the public, or try to compile it for you selv.
Yes Frida is my watchdog!

User avatar
marfis
Posts: 215
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: MicroPython on ESP8266 Kickstarter

Post by marfis » Fri Apr 22, 2016 3:44 pm

So the Alpha4 has been released, thanks!

Unfortunately, on my machine webrepl doesn't seem to work (whereas V3 did). I erased flash before updating, just to make sure but with the same results. I'm on Adafruit's Huzzah Board.

Here is the traceback from a example session:

Code: Select all

>>> import webrepl as w
>>> w.start()
WebREPL daemon started on 192.168.4.1:8266
>>>  # I refresh the browser window here
WebREPL connection from: ('192.168.4.2', 52279)
NLR jump failed

 ets Jan  8 2013,rst cause:2, boot mode:(3,0)

load 0x40100000, len 30596, room 16 
tail 4
chksum 0x8b
load 0x3ffe8000, len 980, room 4 
tail 0
chksum 0x5f
load 0x3ffe83e0, len 2652, room 8 
tail 4
chksum 0x9c
csum 0x9c
␎␌␌l��|��␒rrnb��␌l��␂␌b�l␌b쌜���l�r�␌b␌�lrldon't use rtc mem data
␎l␌l��|��␒rrnb��ll��␌�b�␌b쌜��␂␂�␂␌b�␌�lrl␎�␌l��|��␒rrnb��l␌���pp␌�␌␌b쌜��␂�␌�␌b�lb␎lrl��rl���b␌l�br|�␌b␌ll␌��␜�lb��n�␒nn�␐␂␌␂�l�|␂�l␌�␌l��l�␞���␞��l`␂�␂n�␀���b␌␌�␌�b␌␂␂���b␌l�b�␎lrlr�n��␀�␌��n����␂bp␂b�����␌�␞␐b���|�␌��lrl␂��␂ln�prl␎�␌l��could not open file 'boot.py' for reading
could not open file 'main.py' for reading

#4 ets_task(401002a8, 3, 3fff5148, 4)
MicroPython v1.7-205-gb69d1fc on 2016-04-22; ESP module with ESP8266
Type "help()" for more information.
ideas?

Post Reply