Chat freely about anything...

User avatar
By raz123
#9335 I tried kfricke's build. I'll save everyone some time here:

1. Flash as usual (I used esptool.py).
2. Fire your favorite serial terminal and connect at 115200 (I used putty.exe).
3. Send your python commands.

Code: Select all>>> import pyb; dir(pyb)
['__name__', 'info', 'freq', 'millis', 'elapsed_millis', 'micros', 'elapsed_micros', 'delay', 'udelay', 'sync', 'hard_reset']

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

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

As you can see, the pyb module contains very little (certainly no WiFi).
The io and collections modules seem to be missing, although the documentation explicitly mentions them:
- Builtin modules: gc, array, collections, io, struct, sys.

In conclusion: may be promising; not yet ready for real-world usage.
User avatar
By kfricke
#9498 The MicroPython port of course is not a really feature complete or a satisfying build. The MicroPython port indeed has very little to no useful ESP8266 hardware support.

I have been able to get my own impressions about the features of this build now. Client side WIFI support is basically present.
The following are examples for the current basic WIFI support.

Code: Select allimport esp
Imports the ESP8266 module.

Code: Select allesp.scan(print)
Scans for visible SSIDs. The argument "print" is the callback method receiving tuples which do describe the found SSIDs.

Code: Select allesp.connect('<ssid>', 'pre-shared-key')
Connects to the given network.

Code: Select allesp.disconnect()
Does the obvious.

Still missing are all the portions of the ESP API to handle the real EP hardware and software interfaces. But the foundation to implement the remaining parts of this platform is basically present. Including the fact of already being "official part" of the MicroPython sources.

The reason for this port being that far from complete is not the fact that MicroPython can not support this very resource limited platform!
As far as i can tell the core MicroPython developers are simply focusing on other more important features in the core and the initial STM-HAL platform of the pyBoard.
What this port really needs is support from someone with knowledge about the ESP platform/SDK and a plan about the order of features to be implemented (flash access, filesystem, GPIO acces and so on...).
User avatar
By mianos
#37361 I know both the ESP and micropython so I have, over the last few months, added support for a bunch of ESP specific stuff.
I2C on any pin
Interrupt driven DHT22 driver.
os_timers from the SDK for async timers
os_task support for async io.
os_mutex to sync interrupts and user space code
esp queue to send stuff from async code and interrupts to os_task schedules mini tasks
dalls 1wire for the DS clock and temperature probe
easyconfig (using the android and iOS app to connect to a secure AP without connecting to the board)
Frozen code in ROM.
Interrupt driver GPIO with arbitrary interrupt attachment and queuing.
The mythical gpio16 support.
Fixed TCP/IP.
Support for 1.5 SDK

https://github.com/mianos/micropython
(I pull from master about once a week).
User avatar
By raz123
#38703
mianos wrote:I know both the ESP and micropython so I have, over the last few months, added support for a bunch of ESP specific stuff.
I2C on any pin
Interrupt driven DHT22 driver.
os_timers from the SDK for async timers
os_task support for async io.
os_mutex to sync interrupts and user space code
esp queue to send stuff from async code and interrupts to os_task schedules mini tasks
dalls 1wire for the DS clock and temperature probe
easyconfig (using the android and iOS app to connect to a secure AP without connecting to the board)
Frozen code in ROM.
Interrupt driver GPIO with arbitrary interrupt attachment and queuing.
The mythical gpio16 support.
Fixed TCP/IP.
Support for 1.5 SDK

https://github.com/mianos/micropython
(I pull from master about once a week).


Impressive. Is there a way to store data on the EEPROM?