MicroPython is an MIT-licensed Python ~3.4 for ...
Created by Damien George ...
| Arduino | ESP8266 | ESP32 | RPi 0 W |
|---|---|---|---|
| AVR ATMega328P | Tensilica Xtensa LX106 | Tensilica Xtensa LX6 | ARM BCM 2835 |
| 8 bit | 32 bit | 32 bit | 32 bit |
| 1 core | 1 core | 2 core plus ULP | 1 core plus GPU |
| 20 MHz | 80-160 MHz | 240 MHz | 1 GHz |
| 2 KB RAM | 160 KB RAM | 520 KB RAM | 512 MB RAM |
| 32 KB Flash | 4 MB Flash | 16 MB Flash | MicroSD |
| Arduino | ESP8266 | ESP32 | RPi 0 W |
|---|---|---|---|
| AVR ATMega328P | Tensilica Xtensa LX106 | Tensilica Xtensa LX6 | ARM BCM 2835 |
| 8 bit | 32 bit | 32 bit | 32 bit |
| 1 core | 1 core | 2 core plus ULP | 1 core plus GPU |
| 20 MHz | 80-160 MHz | 240 MHz | 1 GHz |
| 2 KB RAM | 160 KB RAM | 520 KB RAM | 512 MB RAM |
| 32 KB Flash | 4 MB Flash | 16 MB Flash | MicroSD |
original image: zeptobars.com
original image: zeptobars.com
original image: zeptobars.com
![]() |
![]() ESP-WROOM-32 |
![]() |
original images: Random Nerd Tutorials / itead.cc / espressif.com
Witty Cloud / NodeMCU / WeMos D1
ESP32-DevKitC / Sparkfun ESP32 Thing / AdaFruit Huzzah / WeMos LoLin32 Lite
original images: espressif.com and sparkfun.com and adafruit.com and wemos.cc
http://nick.zoic.org/art/rocket-surgery-airborne-iot-telemetry-buzzconf/ https://buzzconf.io/sessions/airborne-iot-build-a-rocket/
| Time | Activity |
|---|---|
| 10:45 | Introduction (Nick Moore / Damien George) |
| 10:55 | Hands on: Installing, the REPL, I/O |
| 11:30 | Short Break |
| 11:40 | Hands on: Networks, Libraries, Building from source |
| 12:15 | Developing on MicroPython (Nick Moore) |
| 12:25 | Lunch / More hacking |
ACKNOWLEDGEMENTS drivers LICENSE py CODECONVENTIONS.md examples logo README.md CONTRIBUTING.md extmod mpy-cross tests docs lib ports tools
ACKNOWLEDGEMENTS drivers LICENSE py CODECONVENTIONS.md examples logo README.md CONTRIBUTING.md extmod mpy-cross tests docs lib ports tools
Documentation, Examples, Tests
ACKNOWLEDGEMENTS drivers LICENSE py CODECONVENTIONS.md examples logo README.md CONTRIBUTING.md extmod mpy-cross tests docs lib ports tools
Shared between ports
ACKNOWLEDGEMENTS drivers LICENSE py CODECONVENTIONS.md examples logo README.md CONTRIBUTING.md extmod mpy-cross tests docs lib ports tools
Ports to specific platforms
bare-arm/ esp32/ minimal/ qemu-arm/ teensy/ windows/ cc3200/ esp8266/ pic16bit/ stm32/ unix/ zephyr/
build/ machine_uart.c moduos.c
esp32.custom_common.ld machine_wdt.c modutime.c
espneopixel.c main.c mpconfigport.h
esponewire.c Makefile mphalport.c
fatfs_port.c makeimg.py mphalport.h
gccollect.c memory.h mpthreadport.c
gccollect.h modesp.c mpthreadport.h
help.c modesp.h network_lan.c
machine_adc.c modmachine.c partitions.csv
machine_dac.c modmachine.h qstrdefsport.h
machine_hw_spi.c modnetwork.c README.md
machine_pin.c modnetwork.h sdkconfig.h
machine_pwm.c modsocket.c uart.c
machine_timer.c moduhashlib.c uart.h
machine_touchpad.c modules/
>>> import esp >>> dir(esp) ['__name__', 'flash_read', 'flash_write', 'flash_erase', 'flash_size', 'flash_user_start'] >>> esp.flash_size() 4194304
esp-idf/components/spi_flash/include/esp_spi_flash.h
/** * @brief Get flash chip size, as set in binary image header * * @note This value does not necessarily match real flash size. * * @return size of flash chip, in bytes */ size_t spi_flash_get_chip_size();
ports/esp32/modesp.c
#include "esp_spi_flash.h"
STATIC mp_obj_t esp_flash_size(void) {
return mp_obj_new_int_from_uint(spi_flash_get_chip_size());
}
ports/esp32/modesp.c
#include "esp_spi_flash.h"
STATIC mp_obj_t esp_flash_size(void) {
return mp_obj_new_int_from_uint(spi_flash_get_chip_size());
}
ports/esp32/modesp.c
#include "esp_spi_flash.h"
STATIC mp_obj_t esp_flash_size(void) {
return mp_obj_new_int_from_uint(spi_flash_get_chip_size());
}
ports/esp32/modesp.c
#include "esp_spi_flash.h"
STATIC mp_obj_t esp_flash_size(void) {
return mp_obj_new_int_from_uint(spi_flash_get_chip_size());
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_size_obj, esp_flash_size);
ports/esp32/modesp.c
#include "esp_spi_flash.h"
STATIC mp_obj_t esp_flash_size(void) {
return mp_obj_new_int_from_uint(spi_flash_get_chip_size());
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_size_obj, esp_flash_size);
STATIC const mp_rom_map_elem_t esp_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_esp) },
{ MP_ROM_QSTR(MP_QSTR_flash_size), MP_ROM_PTR(&esp_flash_size_obj) },
};
ports/esp32/modesp.c
#include "esp_spi_flash.h"
STATIC mp_obj_t esp_flash_size(void) {
return mp_obj_new_int_from_uint(spi_flash_get_chip_size());
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_size_obj, esp_flash_size);
STATIC const mp_rom_map_elem_t esp_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_esp) },
{ MP_ROM_QSTR(MP_QSTR_flash_size), MP_ROM_PTR(&esp_flash_size_obj) },
};
STATIC MP_DEFINE_CONST_DICT(esp_module_globals, esp_module_globals_table);
const mp_obj_module_t esp_module = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&esp_module_globals,
};
ports/esp32/mpconfigport.h
extern const struct _mp_obj_module_t esp_module;
#define MICROPY_PORT_BUILTIN_MODULES \
{ MP_OBJ_NEW_QSTR(MP_QSTR_esp), (mp_obj_t)&esp_module }, \
esp32/Makefile
SRC_C = \
modesp.c \
>>> import esp >>> dir(esp) ['__name__', 'flash_read', 'flash_write', 'flash_erase', 'flash_size', 'flash_user_start'] >>> esp.flash_size() 4194304