 	}
 }
 
+inline String paddedString(const String& s, const uint8_t width, const bool leftJustify = true /* otherwise right-justify */)
+{
+	String padded;
+
+	if (leftJustify)
+		padded = s;
+
+	for (int i = 0; i < (int)s.length() - width; ++i) // If len < s.length(), the loop will handle it correctly, i. e. do nothing
+		padded += ' ';
+
+	if (!leftJustify)
+		padded += s;
+
+	return padded;
+}
+
 void loop()
 {
 	if (samplingWindowFull)


		memcpy(previousFhtValues, fht_log_out, FHT_N / 2);
		runFHT();
		updateTextDisplay();
		updateSpectrumDisplay();
		updateVuDisplay();
		samplingWindowFull = false; // Allow the new sample set to be collected - only after the delay. Else the sample set would be 60 ms stale by the time we get to process it.
	}
}

inline String paddedString(const String& s, const uint8_t width, const bool leftJustify = true /* otherwise right-justify */)
{
	String padded;

	if (leftJustify)
		padded = s;

	for (int i = 0; i < (int)s.length() - width; ++i) // If len < s.length(), the loop will handle it correctly, i. e. do nothing
		padded += ' ';

	if (!leftJustify)
		padded += s;

	return padded;
}

#define RGB_to_565(R, G, B) static_cast<uint16_t>(((R & 0xF8) << 8) | ((G & 0xFC) << 3) | (B >> 3))


inline void updateSpectrumDisplay()
{
	assert(FHT_N == 256);
	//for (int i = 1; i < 128; ++i) // What's the deal with bin 0?
	//{
