Skip to content

Instantly share code, notes, and snippets.

@rmamba
Last active May 15, 2016 12:30
Show Gist options
  • Save rmamba/9dc46b474815587857ddbcc8844fb9aa to your computer and use it in GitHub Desktop.
Save rmamba/9dc46b474815587857ddbcc8844fb9aa to your computer and use it in GitHub Desktop.
#Catalex YX5300 serial MP3 player
#http://www.ebay.co.uk/sch/i.html?_from=R40&_sacat=0&_nkw=YX5300&_sop=15
import serial
s = serial.Serial(port='COM5', baudrate=9600)
#reset
s.write('\x7E\xFF\x06\x0C\x00\x00\x00\xEF')
#set volume
s.write('\x7E\xFF\x06\x06\x00\x00\x1E\xEF')
#play 1st file in loop
#named it '001 - trololo song.mp3' in root folder
s.write('\x7E\xFF\x06\x08\x00\x00\x01\xEF')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment