MaxO/Readme.MD

93 lines
1.9 KiB
Plaintext
Raw Normal View History

2020-11-15 17:47:23 +00:00
MaxO
v0.1
2020-11-15 17:49:39 +00:00
OSC operations for ESP8266 + Max7219 matrixs led with micropython. Need an ESP8266 on a local network with internet gateway at least for install.
2020-11-15 17:47:23 +00:00
2020-11-15 17:49:39 +00:00
OSC commands :
2020-11-15 17:47:23 +00:00
2020-11-15 17:52:11 +00:00
* /demo
* /cls
* /text 'sometext'
2020-11-15 17:47:23 +00:00
2020-11-15 18:20:37 +00:00
OSC port : 9001 (change OSCport in maxserver.py)
2020-11-15 17:47:23 +00:00
Obviously change /dev/cu.usbserial-1D1310 with your serial port like /dev/tty.USB0
2020-11-15 20:14:03 +00:00
Heavy use of https://github.com/mcauser/micropython-max7219 and https://github.com/SpotlightKid/micropython-osc
2020-11-15 17:47:23 +00:00
# Hardware connections
Connections wemos D1 mini https://docs.wemos.cc/en/latest/d1/d1_mini_lite.html
5V VCC
2020-11-15 17:49:39 +00:00
2020-11-15 17:47:23 +00:00
GND GND
2020-11-15 17:49:39 +00:00
2020-11-15 17:47:23 +00:00
D7 MOSI (GPIO13) DIN
2020-11-15 17:49:39 +00:00
2020-11-15 17:47:23 +00:00
D8 CS (GPIO15) CS
2020-11-15 17:49:39 +00:00
2020-11-15 17:47:23 +00:00
D5 SCK (GPIO14) CLK
2020-11-15 17:54:58 +00:00
# Flash micropython firmware
2020-11-15 17:47:23 +00:00
2020-11-15 17:54:58 +00:00
Download micropython firmware for Wemos D1 mini (ESP8266) 1 Mo
2020-11-15 17:47:23 +00:00
https://micropython.org/resources/firmware/esp8266-1m-20200902-v1.13.bin
esptool.py erase_flash
2020-11-15 17:49:39 +00:00
2020-11-15 17:54:58 +00:00
esptool.py --port /dev/cu.usbserial-1D1310 --baud 1000000 write_flash --flash_size=4MB -fm dio 0 PATHTO/esp8266-1m-20200902-v1.13.bin
2020-11-15 17:47:23 +00:00
# install ampy
pip3 install ampy
2020-11-15 17:52:11 +00:00
# Local Wifi config
2020-11-15 17:47:23 +00:00
2020-11-15 17:52:11 +00:00
Set your wifi ssid/password in netconf.py
2020-11-15 17:47:23 +00:00
# Matrixs config vertical or horizontal
2020-11-15 17:52:11 +00:00
Edit in matrix9.py
2020-11-15 17:47:23 +00:00
screen = max7219.Max7219(8, 32, spi, Pin(15))
2020-11-15 17:49:39 +00:00
8 is x. 32 is y (4 8x8 max7219)
2020-11-15 17:47:23 +00:00
# Transfer MaxO
2020-11-15 17:49:39 +00:00
* ampy -p /dev/cu.usbserial-1D1310 put boot.py
* ampy -p /dev/cu.usbserial-1D1310 put wlan.py
* ampy -p /dev/cu.usbserial-1D1310 put netconf.py
* ampy -p /dev/cu.usbserial-1D1310 put main.py
* ampy -p /dev/cu.usbserial-1D1310 put maxserver.py
* ampy -p /dev/cu.usbserial-1D1310 put max9.py
* ampy -p /dev/cu.usbserial-1D1310 put max7219.py
* ampy -p /dev/cu.usbserial-1D1310 put uosc
2020-11-15 17:47:23 +00:00
# Onboard install library via Internet
2020-11-15 17:52:11 +00:00
* ampy -p /dev/cu.usbserial-1D1310 run wlan
* screen /dev/cu.usbserial-1D1310 115200
2020-11-15 17:47:23 +00:00
type in micropython interactive :
2020-11-15 17:52:11 +00:00
* import upip
* upip.install('uasyncio')
* upip.install('ffilib')
2020-11-15 17:47:23 +00:00
# reboot with onboard reset button
2020-11-15 18:04:07 +00:00
reboot
2020-11-15 18:05:40 +00:00
The 'screen' should show you debug prints