Research Article

IoT with BlockChain: A Futuristic Approach in Agriculture and Food Supply Chain

Algorithm 1

The proposed scheme.
1. Initialization of IoT
2. Calculate residual energy (R.E) of each node (ni … nn)
3. Clustering Mechanism
4. If (R.E ni == Max (R.E)) Then
    
 Else
  Cluster_Member= ni
  GoTo Step 2
5. Control Packet broadcasting
6. Data transferring from Cluster_Member
7. Data transferring from Cluster_Member to CH/GH
8. If (R.E ni <threshold) Then
    ni !=CH
   Cluster_Member=ni
  GoTo Step 2
  Else
   Transfer aggregated data to nearest sink Si
9. Transferring data from Si to BS
10. END