Damien George
1a0a323ca8
esp8266: Add initial implementation of machine.UART.
...
Currently UART(0) and UART(1) are exposed and only uart.write works.
2016-04-06 19:45:52 +03:00
Damien George
96eca22322
esp8266: Make destination for vendor OS debug output soft-configurable.
...
Use esp.osdebug(None) to disable, or esp.osdebug(uart_id) to send output
to a UART.
2016-04-06 00:12:58 +03:00
Paul Sokolovsky
81fd5685fc
esp8266: Move pyb.hard_reset() to machine.reset().
2016-04-05 00:20:25 +03:00
Damien George
3962766be0
esp8266: Add esp.neopixel_write function to bit-bang WS2812 data.
2016-03-26 10:55:21 +02:00
Damien George
632d8efa05
esp8266: Add PWM support.
...
PWM implementation uses a timer and interrupts (FRC1), taken from
Espressif's/NodeMCU's implementation and adapted for our use.
8 channels are supported, on pins 0, 2, 4, 5, 12, 13, 14, 15.
Usage:
import machine
pwm0 = machine.PWM(machine.Pin(0))
pwm0.freq(1000)
pwm0.duty(500)
Frequency is shared (ie the same) for all channels. Frequency is
between 1 and 1000. Duty is between 0 and 1023.
2016-03-26 00:32:37 +02:00
Damien George
82b95f625e
esp8266: Implement software SPI class.
...
Supports speeds up to 500k baud, polarity=0/1, phase=0/1, and using any
pins. Only supports MSB output at the moment.
2016-03-25 23:28:13 +02:00
Damien George
78d0dde562
esp8266: Add onewire helper functions as C module.
...
Includes functions to read and write bits and bytes.
2016-03-24 17:33:42 +02:00
Damien George
0cdbd356fd
esp8266: Implement bit-bang I2C read, and add i2c.readfrom method.
...
I2C reading tested with TSL2561 luminosity sensor.
2016-03-24 11:46:05 +02:00
Damien George
dd32f02cc3
esp8266: Add basic I2C driver, with init and writeto methods.
...
Tested and working with SSD1306 I2C display.
2016-03-24 11:17:17 +02:00
Paul Sokolovsky
df1f6783f2
esp8266: Add "socket" and "usocket" aliases for lwip module.
2016-03-23 16:25:55 +02:00
Damien George
8000d51b68
esp8266: Add module weak link from json to ujson.
2016-03-23 14:16:46 +02:00
Paul Sokolovsky
5239a8a82b
esp8266/modnetwork: Add symbolic names for network interfaces: STA_IF & AP_IF.
...
These are expected to be passed to network.WLAN() to instantiate network
interface objects.
2016-03-10 10:44:15 +07:00
Paul Sokolovsky
a49c16069c
esp8266/modnetwork: Introduce interface .config() method.
...
Allows to set (in case keyword args are given) or query (in case a single
"symbolic keyword" (a string, value is the same as keyword)) arbitrary
interface paramters (i.e. extensible and adaptable to various hardware).
Example usage:
ap_if = network.WLAN(1)
ap_if.config(essid="MicroPython on Air")
print(ap_if.config("essid"))
2016-03-10 10:41:55 +07:00
Paul Sokolovsky
1c43a0fbf8
esp8266/modnetwork: Add per-interface .active() method.
...
Allows to up/down interface when called with a boolean, or query current
state if called without args. This per-interface method is intended to
supersede adhoc network.wifi_mode() function.
2016-03-10 09:31:23 +07:00
Damien George
cdad2b6f4d
esp8266: Implement Pin.__call__() and Pin.OPEN_DRAIN mode.
...
OPEN_DRAIN is of course synthesised. All pin modes are tested and
working.
2016-03-05 21:35:32 +02:00
Paul Sokolovsky
c70637bc00
esp8266/modmachine: Timer: Add ONE_SHOT and PERIODIC symbolic constants.
2016-03-04 22:26:59 +02:00
Paul Sokolovsky
7193086c03
esp8266/modmachine: Basic implementation of Timer for OS virtual timers.
2016-03-04 18:40:35 +02:00
Damien George
57884996b9
esp8266: Add time.{sleep_ms,sleep_us,ticks_ms,ticks_us,ticks_diff}.
...
Framework for time.ticks_cpu added, but not implemented.
2016-03-04 09:25:53 +02:00
Damien George
02ea74d8f5
esp8266: Add network.ifconfig().
2016-03-02 23:04:21 +02:00
Alex March
81407729a5
esp8266/modesp: Implement flash_write(), flash_erase().
2016-02-08 11:42:24 +02:00
Paul Sokolovsky
fce0036a67
esp8266: mac() function belongs to network module per the latest API.
2015-12-27 10:03:32 +02:00
Paul Sokolovsky
90202b4c0d
esp8266/modesp: Implement flash_read(offset, size_bytes) function.
...
Based on vendor API documentation, untested on real hardware.
2015-11-24 23:29:26 +02:00
Bill Owens
e2bfa471fa
esp8266: Added wlan.isconnected() to maintain parity with other ports.
2015-09-15 20:07:50 +03:00
Bill Owens
a66a99bfd8
esp8266: Added wifi_mode() to read and set WiFi operating mode.
2015-08-29 16:58:51 +03:00
Bill Owens
60ccb41fac
esp8266: Move status() from esp module to network
2015-06-20 23:35:55 +03:00
Paul Sokolovsky
ee3fec3167
esp8266: Add skeleton "network" module.
...
MicroPython "network" module interface requires it to contains classes
to instantiate. But as we have a static network interace, make WLAN()
"constructor" just return module itself, and just make all methods
module-global functions.
2015-06-12 17:45:20 +03:00
Josef Gajdusek
286ced4c2f
esp8266: Add a bunch of miscellaneous methods
2015-05-28 21:38:46 +03:00
Josef Gajdusek
25a8a42447
esp8266: Add pyb.ADC class
2015-05-28 21:31:37 +03:00
Josef Gajdusek
59610c4004
esp8266: Add uos module
...
Currently implements only .uname()
2015-05-26 22:18:07 +03:00
Josef Gajdusek
103d12a877
esp8266: Add utime and pyb.RTC
2015-05-13 00:12:54 +01:00
Josef Gajdusek
d39d96b700
esp8266: Add .onsent callback support
...
The function passed to socket.onsent() gets called after data is succesfully
sent by the socket.
2015-05-06 21:47:44 +01:00
Josef Gajdusek
9e00ac89d5
esp8266: Add esp.socket class, with ESP-style socket functionality.
...
* UDP currently not supported
* As there is no way (that I know of) the espconn_regist_connectcb()
callback can recognize on which socket has the connection arrived,
only one listening function at a time is supported
2015-05-04 11:48:40 +01:00
Josef Gajdusek
7e7039b53c
esp8266: Export station status() constants
2015-05-03 22:07:00 +03:00
Damien George
87c6250b4c
esp8266: Add basic pyb.Pin class; supports output mode only.
2015-02-13 22:21:44 +00:00
Paul Sokolovsky
d6f648d04f
esp8266: modesp: Add status() function for connection status.
2015-02-05 00:39:02 +02:00
Paul Sokolovsky
1cd47c6315
esp8266: modesp: Add disconnect() function to disconnect from WiFi AP.
2015-02-03 02:02:29 +02:00
Paul Sokolovsky
471b2a8906
esp8266: modesp: Add connect() function to connect to WiFi AP.
2015-02-01 01:36:48 +02:00
Paul Sokolovsky
6ec650b41f
esp8266: Add "esp" module with esp8266-specific "cooperative" networking.
...
So far implements .scan(lambda x: print(x)) function to scan for WiFi access
points.
2015-01-25 17:10:06 +02:00
Paul Sokolovsky
438b3d26b5
esp8266: Add missing hard_reset qstr.
2015-01-18 00:37:46 +02:00
Damien George
075d597464
esp8266: New port of Micro Python to ESP8266 wifi module.
2014-11-27 20:30:33 +00:00