For my microcontroller projects I often want to convert some linear value (like a potentiometer position) into a light intensity. Since our eyes aren’t linear, this requires some math. In this post I present a Python script that does the math for me.