04 - IoT - MicroPython
04 - IoT - MicroPython
A.A. 2022/23
Prof.ssa Lidia Fotia
ZM1Evaluat ion board
ADC can be enabled on D2, D15, D27, D26, D25, D33,
D35, D39, D36, D34, D32, D14, D12, D13, D0 , D4
3V3 GND
EN D23
SERIAL2 RX2 D36 D22
D33 D19
D25 D18
D26 D5
D27 D17 SCL0
I2C0
SCLK0 D14 D16 SDA0
D0 User button
Reset
Pin Product documentation
USB SERIAL0
Downloading MicroPython Firmware
Go to the MicroPython Downloads
page: https://micropython.org/download/.
Select the type of board you’re using. Here is the quick link for ESP32
board:
ESP32 MicroPython firmware
You should see a web page with links to download .bin files.
Download the latest release.
Flashing Firmware using Thonny IDE
Follow the next steps:
Pull-down
Pull-up resistor
Pull-up
Photoresistor
Duty Cycle
Brightness control of a LED with PWM: fading
• PIN PWM: D2 D10 D5 D15 D18 D19 D21 D22 D23 D25
D27 D26 D33
Buzzer piezo
Buzzer control with PWM
A4 – 400Hz
C#5 – 550 Hz
E5 – 660 Hz
A5 – 880 Hz
Pattern: A4, C#5, E5, A5, A5, E5, C#5, A4
Set the duration of each sound to 500ms for 1x speed