Check out DietPi, a lightweight spin of Raspbian. It starts with a very lean and lightweight OS that excludes a lot of the unnecessary software included on Raspbian by default, leaving your environmental control system with more resources.