Main Content

Link an Arduino Uno Wifi Rev 2 with the iNaturalist. org API to stay updated about the species being observed in your area.

Stay updated about the nature being observed near you
iNaturalist is an online application in which users share observations of biodiversity in their local area. The application has over 3 million users and has been used to observe more than 320, 000 species to date.

Using iNaturalist is a fantastic way to learn about nature, get involved with citizen science and keep track of the dynamic biodiversity in your area. The best way I have found to use iNaturalist is with the smart phone app which is available on android or apple. You can make observations with your phone, suggest an identification and have it confirmed or corrected by an active and helpful online community.

I often use the application to check what species have been observed near me most recently. I find this information useful for several reasons. For example, there may have been a sighting of a rare species that is making a return to my local area, or a sighting of a migratory species that is starting to return to the UK from overseas.

A general ethos in my life is to avoid using a smart phone where I can, and so I wanted to make a display that gives me this information without requiring me to check my phone or laptop. Hence the Arduino Wifi iNaturalist display was created.

How the display works
On powerup, the Arduino connects to the world time API to get the current time and date. After this the Arduino continues to keep time using the onboard clock. The Arduino then connects to the iNaturalist API and requests data for the three most recent ‘research grade’ observations in your area. Your area is defined by a set radius (default 20 km) around user supplied latitude and longitude decimal coordinates. The common name, scientific name, place and time of the observations are displayed on the TFT display. Every ten minutes the Arduino re-requests this information and updates the display.

Assembling the display
The display requires an Arduino Uno Wifi Rev 2 and a Arduino Uno compatible TFT display shield. Mount the shield on your Arduino, then download the code from the GitHub repository. In the ‘arduino_secrets.h’ tab define your WiFI SSID, password and your latitude and longitude coordinates. You will need to install the following libraries which are available from the library manager in the Arduino IDE.

WifiNiNA - make HTTP requests.

Adafruit_GFX - draw graphics on the TFT display.

ArduinoJson - deserialize json output.

MCUFRIEND_kbv - hardware specific library to communicate with TFT shield.

Finally upload the code and the display should turn on. It will take ~ 1 minute for the time and species observations in your area to be displayed. If they aren’t, use the Serial monitor to see what error message is being given. If the time is incorrectly given as midnight then the world time API has failed to respond. Reset the Arduino and try again.”

Link to article