Agriculture and farming have gotten smarter as a result of the use of current technology such as Wireless Sensor Networks (WSN) and the Internet of Things (IoT). Smart farming is an enhanced agriculture system that offers data such as temperature, soil moisture, and so on, to assist in the growth of plants and cattle. It integrates wireless sensors and the internet to collect and communicate information with farmers. The priority event-based energy efficient algorithm developed in this study is utilized for accurate and efficient information transmission regarding power consumption and node priority. The major goal of the IoT-sensor network in this chapter is to increase farm productivity and extend its lifespan by applying intelligent algorithms such as Artificial Neural Network (ANN) to recognize environmental conditions and improve total production. Priority event-based energy efficient method reduces energy usage and increases the lifetime using Dijkstra's algorithm.