Topic 15 Using MicroPython on ESP32 Professor Peter YK Cheung Dyson School of Design Engineering URL: www.ee.ic.ac.uk/pcheung/teaching/DE1_EE/ E-mail: p.cheung@imperial.ac.uk PYKC 9 June 2020 Topic 15 Slide 1 DE 1.3 - Electronics 1
ESP32 IoT Microcontroller (1) Bluetooth Embedded flash memory Radio Wi-Fi Cryptographic Hardware CPU core & memory Peripheral Interface Real-time clock & Low Power processor unit PYKC 9 June 2020 Topic 15 Slide 2 DE 1.3 - Electronics 1
ESP32 CPU Core & Memory PYKC 9 June 2020 Topic 15 Slide 3 DE 1.3 - Electronics 1
ESP32 RTC and Power Management Sub-system PYKC 9 June 2020 Topic 15 Slide 4 DE 1.3 - Electronics 1
ESP32 Crypto Hardware PYKC 9 June 2020 Topic 15 Slide 5 DE 1.3 - Electronics 1
ESP32 wireless links PYKC 9 June 2020 Topic 15 Slide 6 DE 1.3 - Electronics 1
ESP32 Peripheral Interfaces & SPI RAM PYKC 9 June 2020 Topic 15 Slide 7 DE 1.3 - Electronics 1
Heltec ESP32 module PYKC 9 June 2020 Topic 15 Slide 8 DE 1.3 - Electronics 1
ESP32 with MicroPython (uPy) Flash ESP32 via esptool PyCharm IDE MicroPython firmware in flash ROM machine esp network Directory sys esp32 neopixel time os math On-chip ROM for programs Editor boot.py main.py oled.py hello.py rotary.py REPL uPy terminal PYKC 9 June 2020 Topic 15 Slide 9 DE 1.3 - Electronics 1
Lab 4A – Setting up the MicroPython environment Task 3 Task 4 Task 1 Task 2 Install Install Erase and Install PyCharm CP2102 flash uPy to esptool IDE with drive driver ESP32 uPy plug-in Tasks 7 Task 8 Tasks 5 & 6 Flashing Explore uPy Display on “Hello world!” via REPL OLED onto ESP32 PYKC 9 June 2020 Topic 15 Slide 10 DE 1.3 - Electronics 1
MicroPython Documentation PYKC 9 June 2020 Topic 15 Slide 11 DE 1.3 - Electronics 1
MicroPython Library Functions math – mathematical functions (e.g. sin, pi) Python standard lib sys – system specific functions (e.g. sys.argv) MicroPython machine – functions related to Libraries processor itself esp – functions related to the board time – functions related to hardware timer MicroPython and ESP32 Various class libraries to drive specific lib peripherals PYKC 9 June 2020 Topic 15 Slide 12 DE 1.3 - Electronics 1
pyb - Class Library class PWM – PWM signal generation class ADC – analog to digital conversion class DAC – digital to analog converson (2 channels) class LED – LED objects to control on board LEDs machine Classes class Pin – control I/O pins class I2C – control I2C interface class Timer – control hardware timers class SPI – control SPI interface PYKC 9 June 2020 Topic 15 Slide 13 DE 1.3 - Electronics 1
Recommend
More recommend