So I posted an intro to the Chiptune Jukebox project before. Here’s another video of it in action in time for October, the Halloween month! (OK, it’s just an excuse to blast out the Munsters theme tune)
Since last time you may notice it now has an audio amplifier as well as displays a load of scrolling green binary whilst playing. This is because I am thinking of including a screen on the final build that will display a menu of songs to scroll through and then play the binary whilst a track is playing. I am still unsure of this at the moment however.
The binary you see is created from the data stream being sent to the Arduino Nano. It’s formatted like so:
dataBuffer = str((self.__data)) sys.stdout.write('\033[1;32;40m' + ' '.join(format(ord(x), 'b') for x in dataBuffer) + '\033[0;37;40m') sys.stdout.flush()
This basically takes the data that is being sent out and writes it out. The \033[1;32;40m makes the text green. It’s then followed by a space and then the dataBuffer string which contains the current data being sent out is converted to binary and then finished off with \033[0;37;40m which makes the text go back to its default colour and background settings.