Code for agricultural embedded system