I have a bag of attiny13a that cost me $0.20 per chip. It is fully self contained. Just add a very small capacitor, give it from 2.8V to 5V. And then you program it the way you want. You can even program and debug it via a single pin if you wish.
At this cost for a hobbyist it's just hard to beat. It can be anything you want it to be in a few lines of code.
I personally write Rust for it, not Arduino C++, but it would work just the same.
I do not, sorry. You can read the datasheet of the chip learn everything about it. You can then search online for some implementation of firmware uploader/programmer like "avrdude". Those chips are very simple, all controlled by toggling bits and values in registers.
At this cost for a hobbyist it's just hard to beat. It can be anything you want it to be in a few lines of code.
I personally write Rust for it, not Arduino C++, but it would work just the same.