The Internet of Things is paving the way for the transition into the fourth industrial revolution with the mad rush of connecting physical devices and systems to the internet. IoT is a promising technology to drive the agricultural industry, which is the backbone for sustainable development especially in developing countries like those in Africa that are experiencing rapid population growth, stressed natural resources, reduced agricultural productivity due to climate change, and massive food wastage. In this paper, we assessed challenges in the adoption of IoT in developing countries in agriculture. We propose a cost effective, energy efficient, secure, reliable and heterogeneous (independent of the IoT protocol) three layer architecture for IoT driven agriculture. The first layer consists of IoT devices and it is made up of IoT driven agriculture systems such as smart poultry, smart irrigation, theft detection, pest detection, crop monitoring, food preservation, and food supply chain systems. The IoT devices are connected to the gateways by low power LoRaWAN network. The gateways and local processing servers co-located with the gateways create the second layer. The cloud layer is the third layer, which exploits the open source FIWARE platform to provide a set of public and free-to-use API specifications that come along with open source reference implementations.