Firmware for atmega using many sensors to measure quality of environment