79150439

Date: 2024-11-02 10:25:02
Score: 0.5
Natty:
Report link

Finally I managed to play the player with this code (the problem actually came from a false contact of a Dupont wire of the GND):

from machine import UART, Pin
from time import *

uart1 = UART(1, baudrate=9600, tx=Pin(4), rx=Pin(5))
uart1.init(bits=8, parity=None, stop=1)
# Play
uart1.write(b'\xaa\x02\x00\xac')
# query play status
uart1.write(b'\xAA\x01\x00\xAB')
# query current song
uart1.write(b'\xAA\x0D\x00\xB7')
uart1.readline()
sleep_ms(10000)
# Stop
uart1.write(b'\xAA\x04\x00\xAE')
# query play status
uart1.write(b'\xAA\x01\x00\xAB')
uart1.readline()

I have the 1st song that starts for 10 seconds, then stops, but I have no answer from the code Query play status, and query current song...

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: joMonk