Arduino Lightsaber

jbkuma:
A number of us have looked at various ways to do this with both hardware and software, but I don't think anyone has done it with an atmega328p based setup. It would also take some wizardry to do with the external sound chips we typically use. The best options revolve around using more advanced chips. There is some development being done currently on nRF52 based and ESP32 based saber boards. Nothing is currently publicly available for those yet though.

I did publish an audio library for nRF52 a few weeks ago.

It's not 100% ready for prime time, but anyone interested can take a look. The library assumes you are using the Arduino core for the Adafruit Feather nRF52 Bluefruit LE - nRF52832 (Adafruit Feather nRF52 Bluefruit LE [nRF52832] : ID 3406 : Adafruit Industries, Unique & fun DIY electronics and kits), but could likely be ported to work with other cores. It features an ability to play back sounds a different rates (higher/lower pitch) as well as do ployphonic playback (multiple sounds playing at the same time). We are planning to use this to add dynamic swing to the DIYino Infinity boards. We still have a lot of work to do before we have a full saber sketch, though.