Write and test first, then buy the hardware you need.