A smart sensor for precision agriculture powered by microbial fuel cells