Last active
May 15, 2016 12:30
-
-
Save rmamba/9dc46b474815587857ddbcc8844fb9aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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