Using PlatformIO Serial Monitor and Sensors

Overview

Teaching: 0 min
Exercises: 90 min
Questions
  • How do I check the status of my logger in PlatformIO?

  • How do I add sensors to the EnviroDIY Mayfly?

Objectives
  • Learn the serial monitor. Set real time clock on Mayfly. Connect sensor to Mayfly.

Prerequisites

Episode 6: Using PlatformIO Serial Monitor and Sensors

This lesson builds directly on Episode 5: Using PlatformIO and Mayfly. We will interactively explore the features of PlatformIO and finalize your readiness for using the EnviroDIY Modular Sensors sketches in Part 2 (Episodes 8-13).

Load your second sketch from PlatformIO to the Mayfly!

Oh hey! There’s a sensor on the Mayfly!

Running sketches in PlatformIO

From this point forward we will not remind you of the steps to upload a sketch, so here they are for quick reference:

  1. Add your project directory in the src_dir list in platformio.ini.
  2. Double check that the baud rate in the sketch matches the setting in platformio.ini.
  3. Save platformio.ini to build all the directories needed for the sketch.
  4. Build and upload the sketch.
  5. Run the serial monitor.

Set Real Time Clock on the Mayfly

Connect OneWire sensor: DS18B20 waterproof temperature

Connect I2C sensors: BME280 temperature, pressure, and humidity and OLED display

Extras

If you are able to edit and run sketches using PlatformIO and upload them to the Mayfly, you are ready for Part 2 (Episodes 8-13), where we begin to use the Modular Sensors library.

Key Points

  • Translate additional skills from earlier tutorials using Arduino UNO + Arduino IDE to PlatformIO IDE + EnviroDIY Mayfly logger.