#doing midi on the pico
1 messages · Page 1 of 1 (latest)
you metioned Mu?
I had disconnected the pico during the installation, it is now connected and i had selected CircuitPython
ok, clicking on serial should show the serial output
yes error - ImportError: no module named 'adafruit_dotstar'
aha ! well let's install that then !
okay!
Do i get that from the adafruit bundle?
yeah from the bundle
I just placed the adafruit_dostar in the LIB folder of the CIRCUITPY -> CTRL D ->
adafruit_dotstar.mpy ?
adafruit_dotstar.mpy from the lib directory in the bundle
oops..
I deleated the file folder containing the .xtx file and placed the adafruit_dostar.mpy in the Lib folder on the CIRCUITPY
ok so it's running now
you can add prints in the code to see if the buttons are properly detected, and you need a midi app to see if the midi commands are correctly sent
Right on!.. do i need to install anything for the Pico Display?
can you link to the product ?
there's example code to setup the display
https://github.com/adafruit/Adafruit_CircuitPython_ST7789/blob/main/examples/st7789_240x135_simpletest_Pimoroni_Pico_Display_Pack.py
so you need that library (adafruit_st7789)
if you want to adapt the full code of the learn guide, the display is the easy part, adapt the dimensions and simply substitue the display variable setup for the on for your display
so i should pull the adafruit_st7789 from the bundle download and place the the Lib folder on the CIRCUITPY and then CTRL D?
you have to add the setup code from the example I linked, like that:
from adafruit_st7789 import ST7789
# Release any resources currently in use for the displays
displayio.release_displays()
tft_cs = board.GP17
tft_dc = board.GP16
spi_mosi = board.GP19
spi_clk = board.GP18
spi = busio.SPI(spi_clk, spi_mosi)
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs)
display = ST7789(
display_bus, rotation=270, width=240, height=135, rowstart=40, colstart=53
)
hmmm it uses the same clock and mosi pins as the DotStar
you might have to adapt the pins to your wiring, how is everything wired together ?
wait, isn't the display supposed to be connected the other way around ?
when viewed from the top of the screen, the 3V pin is on the left
or from the back of the screen, it's the top of the pico
now you need to put it on the side and use wires, in a way it helps since you can choose different SPI pins to avoid conflict with the dotstars
gotcha! ill connect the wires as its shown on the pinout
I can use these pins, correct?
yes
the display uses a lot of pins wow
I believe you can remap the display SPI pins like this to avoid clashing with the keypad pins:
(the blue lines, moving from GP17, 18, 19 to GP9, 10, 11 - note that the pins numbers on the picture are physical pins, not GPIO numbers, check on the pico pinout what the GPIO numbers are)
i'll try that rightr now!