OSC operations for ESP8266 + Max7219 matrixs led with micropython
转到文件
Sam 87050b225e small steps 2020-11-15 21:14:03 +01:00
uosc first commit 2020-11-15 18:47:23 +01:00
Readme.MD small steps 2020-11-15 21:14:03 +01:00
boot.py first commit 2020-11-15 18:47:23 +01:00
main.py better main 2020-11-15 19:04:07 +01:00
max9.py first commit 2020-11-15 18:47:23 +01:00
max7219.py first commit 2020-11-15 18:47:23 +01:00
maxserver.py small steps 2020-11-15 21:14:03 +01:00
netconf.py first commit 2020-11-15 18:47:23 +01:00
wlan.py wlan error 2020-11-15 19:37:26 +01:00

Readme.MD

MaxO v0.1

OSC operations for ESP8266 + Max7219 matrixs led with micropython. Need an ESP8266 on a local network with internet gateway at least for install.

OSC commands :

  • /demo
  • /cls
  • /text 'sometext'

OSC port : 9001 (change OSCport in maxserver.py)

Obviously change /dev/cu.usbserial-1D1310 with your serial port like /dev/tty.USB0

Heavy use of https://github.com/mcauser/micropython-max7219 and https://github.com/SpotlightKid/micropython-osc

Hardware connections

Connections wemos D1 mini https://docs.wemos.cc/en/latest/d1/d1_mini_lite.html

5V VCC

GND GND

D7 MOSI (GPIO13) DIN

D8 CS (GPIO15) CS

D5 SCK (GPIO14) CLK

Flash micropython firmware

Download micropython firmware for Wemos D1 mini (ESP8266) 1 Mo

https://micropython.org/resources/firmware/esp8266-1m-20200902-v1.13.bin

esptool.py erase_flash

esptool.py --port /dev/cu.usbserial-1D1310 --baud 1000000 write_flash --flash_size=4MB -fm dio 0 PATHTO/esp8266-1m-20200902-v1.13.bin

install ampy

pip3 install ampy

Local Wifi config

Set your wifi ssid/password in netconf.py

Matrixs config vertical or horizontal

Edit in matrix9.py

screen = max7219.Max7219(8, 32, spi, Pin(15))

8 is x. 32 is y (4 8x8 max7219)

Transfer MaxO

  • 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

Onboard install library via Internet

  • ampy -p /dev/cu.usbserial-1D1310 run wlan
  • screen /dev/cu.usbserial-1D1310 115200

type in micropython interactive :

  • import upip
  • upip.install('uasyncio')
  • upip.install('ffilib')

reboot with onboard reset button

reboot

The 'screen' should show you debug prints