Fruit flies cause production losses in mango orchards affecting fruit quality. A National Campaign against Fruit Flies (NCFF) evaluates farm status using the fruit flies per trap per day index (FTD). Traps with attractant are installed manually within orchards in Mexico, but counting the flies trapped every week requires excessive numbers of trained personal. Electronic traps (e-traps) use sensors to monitor fruit fly population, saving labor and obtaining the real-time orchard infestation. The objective of this work was to acquire an image within a e-trap at 17:00 when an insect was detected and binarize the information in real-time to count the number of flies. Each e-trap was implemented with a polyethylene PET bottle screwed to a tap containing an ESP32-CAM camera. E-traps from several hectares of mango trees were sampled and transmitted through WSN wireless sensor networks. This original system presents a star topology network within each hectare with the long range LoRa transceiver at the central tower. It receives the fly count from five e-traps and finally transmits data to the house tower end point. Another contribution of this research was the use of a DJI mini2 for acquiring the e-trap data, and the 8-ha flight took 15 min and 35 s. This period can be reduced if the drone flies higher.