## 3 Communication in IoT
### Commonly Used Sensors for Smart Farming and Heavy Metal Identification
support for the link to the mote, the Mica2/MicaZ are fitted with moisture, temperature, and light sensors [162]. These motes also measure barometric pressure, seismic waves, etc. [172; 173; 174]. Usually, the sensor nodes of a WSN consist of three basic building blocks: sensors, computer units, and communication units. The sensor nodes need a working device, a routing protocol, and eventually a simulator to allow a WSN to function properly. The most critical issues concerning WSN include the lack of standardization of the hardware nodes, limited consumption of energy, communication latency, out-of-order and loss of packets, distributed reconfiguration and scalability factors. In this regard, the Operating System (OS) acts at the helm to arbitrate the resource access. It is worth noting that the primary OS's for WSNs are TinyOS, MANITS, Contiki, Nano-RK, and LiteOS [175]. TinyOS (TOS) is open source, modular, component-based, module-specific and built for wireless sensor networks [176]. Nonetheless, this OS complies with programs which require very low memory and also comprises numerous libraries that manage network protocols, distributed services, transducer drivers, and data collection tools. TinyOS uses a monolithic architecture class to construct a static image on the node using the component model. TOS offers multithreading support from version, named TOS Threads, using a cooperative threading approach. In order to come up with a lightweight open source OS, Contiki was developed by the Swedish Institute of Computer Science [177]. The promising factor of Contiki is its portability factor which is based on an event-driven kernel. Contiki includes so-called protothreads, which can be used at the individual process level. Nonetheless, Contiki includes many applications supporting features like the multitasking kernel, preventive multithreading, prototype threads, TCP/IP protocol, IPv6 protocol, light tenlect client, and quick web server etc. [178]. It is worth noting that Contiki supports dynamic memory management; it does not support applications in real time [179]. With the advent of cross platform requirements, the multi-threaded WSN models were developed. The MultimodAl system for in situ wireless sensor (MANFIS) NeTworks [164] is a multi-threaded WSN operating system. MANFIS is an easy-to-use OS that includes kernel, scheduler, and network stack, and is compatible to be used across various platforms, i.e., PDA or a PC. In addition, Nano-RK was built for WSNs based on multitasking [175]. The design objectives for Nano-RK include multihop networking, effective power management to extend WSN lifetime, limited resources lighting applications, and priority scheduling. LiteOS based in Unix was developed by the University of Illinois at Urbana-Champaign [164] in order to support the programming paradigm for WSNs. LiteOS offers a familiar Unix, thread, and C programming environment and is built using a hybrid programming model  
Figure 11: Mica2 Mote sensor [174]. which allows programming, both event-driven and thread-driven. Some of the common wireless nodes which can be used in precision agriculture are summarized in Table 3 along with the details of the transceiver and microcontroller. Now, the question is how the previously discussed sensors could be deployed over an IoT-based High-Performance Computing (HPC) framework with optimized scheduling. In this regard, the next subsection discusses the significance of Edge Computing.