Source code of Lucía Rosselot's project: Evoluciones Sensibles
.
Pontificia Universidad Católica de Chile, Escuela de Diseño, 2020.
-
Getting started with MicroPython on the ESP32: https://docs.micropython.org/en/latest/esp32/tutorial/intro.html
-
Controlling NeoPixels: https://docs.micropython.org/en/latest/esp8266/tutorial/neopixel.html
-
_thread in ESP32: https://docs.pycom.io/firmwareapi/micropython/_thread/#app
-
Python threads: https://www.youtube.com/watch?v=IEEhzQoKtQU
-
HC-SR04 Sensor Driver in Mipropython: https://github.com/rsc1975/micropython-hcsr04
-
ESP32 firmware: https://micropython.org/download/esp32/
-
Ampy documentation and usage: https://cdn-learn.adafruit.com/downloads/pdf/micropython-basics-load-files-and-run-code.pdf
-
esptool.py -p /dev/ttyUSB0 erase_flash
-
esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 firmware/esp32-idf3-20200902-v1.13.bin
-
ampy --port /dev/ttyUSB0 ls
-
ampy --port /dev/ttyUSB0 get boot.py
-
cu -l /dev/ttyUSB0 -s 115200 ~.
- Quick board reflash:
esptool.py -p /dev/ttyUSB0 erase_flash
esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 firmware/esp32-idf3-20200902-v1.13.bin
ampy --port /dev/ttyUSB0 ls
The final return of this routine should be
/boot.py
- Quick project upload to board:
ampy --port /dev/ttyUSB0 mkdir grid
ampy --port /dev/ttyUSB0 put o_src/grid/Grid.txt grid/Grid.txt
ampy --port /dev/ttyUSB0 put o_src/lib
ampy --port /dev/ttyUSB0 put o_src/boot.py
ampy --port /dev/ttyUSB0 put o_src/main.py
ampy --port /dev/ttyUSB0 ls
The final return of this routine should be
/boot.py
/grid
/lib
/main.py
Important: This routine does not overwrite files of the lib directory that have been already uploaded.
- Optimice and develop a lighter version of the code
Idealy work only with streams of states ands light transitions
- Addition of args handling in
set_state_element_by_num
andset_state_element_by_pos
methods in order to decrease thedata_structures.py
module length.
Maybe MicroPython does not handle args and kwargs