Farm residues may provide energy to farms and to other purposes, by pyrolysis of these residues to produce biofuels. An example of smart farming is to encourage farmers to forward their crop residues to paper, board, and biofuel industries, instead of just burning them, which damage both the economic value of residues and the environment. The below mentioned article discusses many related aspects. Happy new year.