I am trying to send some MIDI messages through the UART. I am finding that every message above 0xB0 produces nothing on the output as seen by the MIDI monitor app on a Mac. This is the code I am using:- """ MicroPython code to write from UART1 on the Pico sends some MIDI messages """ from machine im...
But how do I use this Library on the Pico? You first have to load in into the Pico. To do this click on the Tools menu in Thonny and choose "Manage Packages ..." The search for dht in the box. It should come up with at least one option. Choose the one that looks right from the description and selec...
We get this question almost every day on the Arduino forum. What you need to do is to rewrite your code that does the patterns in a way known as a state machine. This is so the code can look at the change button every time the pattern makes just one small step. This means you have to :- 1) remove al...
Ok this has now been proved to work:- from machine import mem32 PIO_base = [ 0x50200000, 0x50300000 ] SM_SHIFTCTRL= [ 0x0d0, 0x0e8, 0x100, 0x118] PIO_FIFO_JOIN_TX = 1 PIO_SM0_SHIFTCTRL_FJOIN_TX_BITS = 0x40000000 PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS = 0x80000000 PIO_SM0_SHIFTCTRL_FJOIN_TX_LSB = 30 # then ...
Thanks for the reply. I'm not quite sure I follow... can you elaborate? It just seemed to me that the buck was being passed over to you. It's almost certainly possible to use machine.mem32 to set the PIO shiftctrl register directly from Python It appears that is the answer. I got an answer on the RP...
I want to join the TX and RX FIFO buffers together, using a PIO UART According to the rp2040 data sheet this is done by:- sm_config_set_fifo_join(&c, PIO_FIFO_JOIN_TX) But this is in C, does anyone know the python for this? I asked this on the Raspberry Pi forum and the bottom line was:- I guess it ...