Gaslit by ChatGPT
/I’m writing some code to drive a tiny mp3 player. These things are awesome. You can get them for a couple of quid each, pop in an SD card with some files on it and off you go. I’ve used them before, but I wanted a MicroPython driver to go with the Connected Little Boxes framework I’m building.
ChatGPT made me the driver, and helpfully included a demo program. I dropped it all in place and it worked, except that the music glitched after it started. This was a worry, so I spent a moment looking for power supply problems and checking the MicroSD card I was using. Then I took a proper look at the demo code that had been written for me:
df.play_track(1)
time.sleep(2)
df.pause()
time.sleep(1)
df.play()
Oh ha ha. The demo program pauses the playback and resumes it, giving me a glitch. ChatGPT was unmoved when I pointed this out. It told me it was just showing me another feature of the code…