38 lines
532 B
Markdown
38 lines
532 B
Markdown
|
#
|
||
|
|
||
|
##
|
||
|
|
||
|
```shell
|
||
|
# ...
|
||
|
esptool.py --port /dev/ttyACM0 erase_flash
|
||
|
# ...
|
||
|
esptool.py --chip esp32s2 --port /dev/ttyACM0 write_flash -z 0x1000 ~/Downloads/LOLIN_S2_MINI-20240222-v1.22.2.bin
|
||
|
```
|
||
|
|
||
|
```shell
|
||
|
pip3 install rshell #
|
||
|
pip3 install mpremote #
|
||
|
```
|
||
|
|
||
|
### Выполнение кода
|
||
|
|
||
|
```shell
|
||
|
rshell --port /dev/ttyACM0 cat blink.py
|
||
|
```
|
||
|
|
||
|
```python
|
||
|
import machine
|
||
|
import time
|
||
|
|
||
|
led = machine.Pin(15, machine.Pin.OUT)
|
||
|
|
||
|
led.on()
|
||
|
time.sleep(1)
|
||
|
led.off()
|
||
|
time.sleep(1)
|
||
|
```
|
||
|
|
||
|
```shell
|
||
|
mpremote exec 'exec(open("blink.py").read())'
|
||
|
```
|