Despite the numerous advantages of using Wireless Sensor Networks (WSN) in precision farming, the lack of infrastructure in the remote farm locations as well as the constraints of WSN devices have limited its role, to date. In this paper, we present the design and implementation of our WSN based prototype system for intelligent data collection in the context of precision dairy farming. Due to the poor Internet connectivity in a typical farm environment, we adopt the delay-tolerant networking paradigm. However, the data collection capability of our system is restricted by the memory constraints of the constituent WSN devices. To address this issue, we propose the use of Edge Mining, a novel fog computing technique, to compress farming data within the WSN. Opposed to the conventional data compression techniques, Edge Mining not only optimizes memory usage of the sensor device, but also builds a foundation for future real-time responsiveness of the prototype system. In particular, we use L-SIP, one of the Edge Mining techniques that provides real-time event-driven feedbacks while allowing accurate reconstruction of the original sensor data, for our data compression tasks. We evaluate the performance of L-SIP in terms of Root Mean Square Error (RMSE) and memory gain using R analysis.