Microprocessors for fun.
I'm programming with the LOLIN D1 mini, a super inexpensive, arduino compatible board.
- python 3
- pyenv for python version management
- poetry for package management
- CH341 serial drivers
- MicroPython Tool (ampy)
- tio - a simple serial device I/O tool
# install the supported python version
pyenv install
# launch the local virtual env
poetry shell
# install the project dependencies
poetry install
# listing devices
tio -L
# set the serial port of the device based on the output of tio -L
export SERIAL=/dev/ttyUSB0 # for linux
export SERIAL=/dev/tty.usbserial-10 # for mac
# connecting to serial
tio $SERIAL
# is the same as:
tio -b 115200 -d 8 -f none -s 1 -p none $SERIAL
# list all deployed files
ampy --port $SERIAL --baud 115200 ls
# deploy
ampy --port $SERIAL --baud 115200 put src/ .
## Remember to restart the board
curl https://micropython.org/resources/firmware/esp8266-20230426-v1.20.0.bin --output esp8266.bin
esptool.py --port $SERIAL --baud 460800 write_flash --flash_size=detect -fm dout 0 esp8266.bin
#remove brltty -
sudo apt-get purge --auto-remove brltty
# The initial baud rate of the chip is 74880
# use this rate to see boot messages, usefull if stuck in boot loop
tio -b 74880 -d 8 -f none -s 1 -p none $SERIAL | tee serial.log
- MicroPython ESP8266
- Awesome ESP
- MicroWebSrv2
- Message Queuing Telemetry Transport (MTTQ)