This article was featured on Ambcrypto.


There are a lot of blockchain and IoT companies out there. Most of them I have seen are ICOs in the funding stage.

I want to see some actual tech!

Today, I want to show you how local farms can use an IoT system in their business using the NEM blockchain and Arduino.

I have already done a variation of a blockchain tracking device like this using Arduino and Tendermint, but my next installment will use NEM and a SparkFun ESP8266 board. This guide will feature my project-to-be’s components.

This is in theory right now. I have not tested these components or written any code yet. This is not a step-by-step guide, but a scenario

Main materials needed:

  • 1x SparkFun ESP8266 Thing (any Arduino Wifi board will work)
  • 1x DHT11 temperature & humidity sensor
  • 1x Lithium Ion battery
  • 1x RTC Module (for keeping time)

What are we accomplishing?

In this example, I just want to track the temperature of a shipment of beef from when it leaves the farm until it reaches my local supermarket. Data such as which animal it was from, the farm, the farmer, and more can also be logged.

For this example, I want to make sure my meat has been at a consistent and safe temperature throughout shipment. This way, I can avoid consuming anything that may harm me before I even buy the item.

Bacteria can start growing on meat once it reaches higher temperatures, which can generate toxic proteins.

Not something I want to put in my body.

This also allows farms and supermarkets to isolate incidents of food poisoning, as they can track the shipment to a certain animal or plot of land.

Recently in the US, there was an E. Coli outbreak from romaine lettuce . Farms recalled all the lettuce, as they didn’t quite know the source of the outbreak. With a method such as this, they could’ve tracked down a bad batch down to the plot of land, thus isolating the incident (and not taking my lettuce).

What will the Arduino do?

The Arduino will log the temperature of a serialized crate of beef from the farm at various intervals. For this scenario, let’s say the delivery truck has internet connectivity that the SparkFun Thing is using.

The Journey

And the journey begins! The shipment of beef from bull #149 is loaded on the truck for transportation.

Now get ready for some numbers:

Let’s say the trip from the farm to the supermarket is 45 minutes.

The SparkFun Thing logs the temperature every two seconds and averages the temperature every 10 minutes and sends a transaction to the NEM blockchain.

In NEM, a transaction can contain a 1024 character message. This transaction that we send contains a message, which would look something like this:


This message means the crate of beef with ID 149 (same as the bull the meat was from) has an average temperature reading of 40 degrees Fahrenheit at 12:49 PM.

(I see @aleix_mp asset library being a great way to also do this)

This process happens every 10 minutes and is sent to the farm’s beef NEM address.

There could be an address representing shipments for lamb, duck, or fish. Each address corresponds to a type of meat.

Finally, when the crate reaches the supermarket, our device is returned back to the farm and the meat is stocked.

When a customer walks in, they can view the journey of the shipment along with which animal the meat is from.

The customer app indexes the beef shipment from the company’s NEM account and displays if the temperature threshold has been crossed (if the meat is safe for consumption). In other words, it either gives a SAFE or NOT SAFE reading for that specific package of meat.

The customer can also choose to look further at all the readings submitted by our SparkFun Thing.


As you can see, blockchain is a great use case for this type of application. It provides transparency and trust, and in this case, assurance for the customer. It also allows farms and corporations to isolate incidents. If you like this type of article, be sure to follow me as I will work on more topics related to this.

If you would like to chat more about blockchain and IoT, you can find me on any of the NEM channels on Telegram @crackingcode.

And if there are any other IoT + blockchain projects that are showing off some tech, please share them!

Thank you for reading!