4K
This is very similar to the first example, this time I wanted to check out the MH-ET LIVE MiniKit for ESP32 rather than the Lolin32
Parts List
Name | Link |
MH-ET LIVE ESP32 MINI KIT | MH-ET LIVE ESP32 MINI KIT WiFi+Bluetooth Internet of Things development board based ESP8266 Fully functional D1 MINI Upgraded |
Pinout
This is taken from https://riot-os.org/api/group__boards__esp32__mh-et-live-minikit.html
Pin | Default Configuration* | Optional Modules* | Remarks / Prerequisites | Configuration |
---|---|---|---|---|
GPIO2 | PWM_DEV(0):0 / LED blue | PWM Channels | ||
GPIO0 | PWM_DEV(0):1 | PWM Channels | ||
GPIO4 | PWM_DEV(0):2 | PWM Channels | ||
GPIO15 | PWM_DEV(0):3 | PWM Channels | ||
GPIO22 | I2C_DEV(0):SCL | I2C Interfaces | ||
GPIO21 | I2C_DEV(0):SDA | I2C Interfaces | ||
GPIO18 | SPI_DEV(0):SCK | SPI Interfaces | ||
GPIO19 | SPI_DEV(0):MISO | SPI Interfaces | ||
GPIO23 | SPI_DEV(0):MOSI | SPI Interfaces | ||
GPIO5 | SPI_DEV(0):CS0 | SD Card CS | when module sdcard_spi is used | SPI Interfaces |
GPIO1 | UART_DEV(0):TxD | Console (configuration is fixed) | UART interfaces | |
GPIO3 | UART_DEV(0):RxD | Console (configuration is fixed) | UART interfaces | |
GPIO9 | UART_DEV(1):TxD | UART interfaces | ||
GPIO10 | UART_DEV(1):RxD | UART interfaces | ||
GPIO34 | ADC_LINE(0) | ADC Channels | ||
GPIO35 | ADC_LINE(1) | ADC Channels | ||
GPIO36 | ADC_LINE(2) | ADC Channels | ||
GPIO39 | ADC_LINE(3) | ADC Channels | ||
GPIO25 | DAC_LINE(0) | DAC Channels | ||
GPIO13 | – | |||
GPIO12 | – | |||
GPIO14 | – | |||
GPIO16 | – | MRF24J40 RESET | when module mrf24j40 is used | |
GPIO17 | – | MRF24J40 INT | when module mrf24j40 is used | |
GPIO26 | – | MRF24J40 CS | when module mrf24j40 is used | |
GPIO27 | – | |||
GPIO32 | – | |||
GPIO33 | – |
And here is the image from the same site
Code
The code is similar – just uses a different I/O from the Lolin32 – I added debug as I was having problems with an I2CScanner, not really required in this example
[codesyntax lang=”python”]
from machine import Pin from time import sleep led = Pin(2, Pin.OUT) while True: led.value(0) print("LED OFF") sleep(2) led.value(1) print("LED ON") sleep(2)
[/codesyntax]