UART communication between Pico and DY-HV8V audio module #15354
Replies: 4 comments 8 replies
-
First of all, the GND connection between the RP2040 and the audio board seems missing. |
Beta Was this translation helpful? Give feedback.
-
Is this the same DY-HV8F module you asked about here: DY-HV8F audo module in UART mode - Raspberry Pi Forums? This board seems to use the same command set as the XY-V17B board that we seemed to deal with on this thread on the Raspberry Pi board: Re: Changing Hex String |
Beta Was this translation helpful? Give feedback.
-
I ordered another Pico and wired it up and it worked first try. I am guessing the UART 0 pins are damaged on the other board? |
Beta Was this translation helpful? Give feedback.
-
I went back to the original PICO and wired up the UART 1 pins 4 & 5 and that worked too. So there must be an issue with UART 0 pins 0 & 1? One thing that I did differently on the new PICO is that I soldered pin headers to Pin 0, 1 and grd and wired pin headers to the audio board and then used jumpers to wire it up. Since that worked I went back and soldered pin headers to the original Pico and tried it and it still failed on UART 0. But when I added pin headers to pins 4 & 5 when I tested it and like I said that worked. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to send commands to the audio board. The protocol uses a string of hex bytes
AA [Command] [Length] [data] [CRC]
from machine import UART, Pin
from time import sleep
uart = UART(0, 9600, tx=Pin(0), rx=Pin(1), bits=8, stop=1, parity=None)
uart.write(b'\xaa\x07\x02\x00\x01\xB4)
But nothing happens. Even if I send
uart.write(b'\xaa\x01\x00\xab')
sleep(1)
print(uart.read())
I get None back. Not sure what I am doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions