Select to view content in your preferred language

Microcontrollers (Adafruit, Arduino, Micro:bit, Pi) and ArcGIS Online for the classroom

1166
0
09-01-2022 12:34 PM
TomBaker
Esri Regular Contributor
1 0 1,166

From middle school to graduate school, microcontrollers have been growing in popularity over the past five to ten years.  Especially visible in STEM, Maker, CTE, and computer science classrooms, these affordable little devices can often act as automated GIS data collectors – reporting environmental data like temperature, humidity, sound levels, and proximity warnings.  With a little bit of code, microcontrollers can pass that data back to a waiting feature service in ArcGIS Online.

Screen Shot 2022-09-01 at 1.26.44 PM.png

 

I’ve created a collection of workflows for using various microcontrollers (and one microcomputer) to collect temperature data and report that data automatically to ArcGIS Online.  Each workflow includes a description of the process, some sample code (various languages), and a sample Survey123 feature service.

The following is an overview of the current collection.

  1. Submitting data…. : Walks through the basic code for sending simple, POST data to a feature service.  This Python code is the basis for most of the remaining microcontroller examples.  It can also be used in any Python 3.x environment to send data to ArcGIS Online.   Unknown.jpeg
  2. The Raspberry Pi microcomputer can natively run Python and has pins for plugging in sensors (like the DHT22 temperature sensor).  While a Raspberry Pi is the most expensive (about $65 US) of the devices discussed here, it is also the most flexible.  It can even act as a desktop computer, if needed.
  3. The BBC micro:bit is a microcontroller with several built-in sensors – and it’s built for student learning. In the micro:bit workflow, I leave the device attached to a computer for transmitting temperature data over the USB cable – to an awaiting Python script that pushes the micro:bit data into ArcGIS Online.
  4. The Adafruit Circuit Playground Express is a microcontroller with several built-in sensors.  It’s very similar to the micro:bit and the workflow outlined is the same one used by micro:bit.  Why this controller?  It’s more popular in the Maker space in the US and in my opinion, has a strong community base and lots of sample code on the web. I really like the support for Circuit Python on this device!
  5. Adafruit Feather running Arduino Sketches is the last microcontroller that I’ve included in this initial collection.  As its name suggests, the Feather is very small and light, making it a great candidate for attaching to moving things (kites, bikes, dogs, etc).  The Feather model in this workflow also has a built-in WiFi card, allowing for simpler deployment anywhere within your school’s network.  Like the Raspberry Pi, this microcontroller required an external sensor to be attached.  Unlike any of the other workflows on the list, this device uses Arduino Sketches to program the controller – to connect to wifi, to read the sensor, and to transmit the data.

I’ve included a hardware list in each workflow to help you get started, but beware.  The workflows above aren’t complete enough to take you from “zero to hero”.  Be ready to do some outside reading if you’re not already familiar with these tools.

Lastly, the sky is the limit.  Whether you want to create a sensor network to monitor microclimates, noise levels within your school, or nighttime ambient light levels in the neighborhood, some combination of microcontrollers and sensors will probably help you meet your automated data collection needs – at a modest price.

Start your exploration!