====== Lab 04 ====== ===== Exercise Objectives ===== * Introduce SPI communication * Use external library to communicate with MAX7219 8x8 LED matrix driver ===== Documents and materials ===== * MAX7219 * {{ :courses:be2m37mam:labs:max7219-max7221.pdf |reference manual}} * {{ :courses:be2m37mam:labs:max7219.py |MicroPython library}}, available on [[https://github.com/mcauser/micropython-max7219|github]] * Wokwi [[https://wokwi.com/projects/380861562197134337|simulation]] ===== Tasks ===== - Upload library into RPi Pico - Try simple communication over SPI bus - Try methods from the library to create more advanced display actions (animation, etc.) - Optional: use both matrix display and matrix keyboard to display pressed key ===== Code ===== import max7219 from machine import Pin, SPI spi = SPI(1) display = max7219.Matrix8x8(spi, Pin('X5'), 1) display.text('1',0,0,1) display.show()