StratoLab

Lesson 1: Introduction and how to get started building the StratoLab

Objectives:

Students will:

Materials:

What do all these parts do anyway?

Microcontroller

Breadboard

LED

Resistors

BMP-180

GPS Module

SD Card Reader

Integrated Development Environment (IDE)

Basic Guide to Electronics Safety

Activity

Getting started with the IDE

  1. You will be using the Arduino IDE. This IDE can be accessed in two different ways:
    • Installed on a laptop
    • Accessed on the web
      The installed version is recommended since it is more powerful and customizable. Use the link above to download and install the software. Check with your mentor or instructor if there are any special steps needed for your computer.
  2. You will also need to install some special files that are needed to control the ESP32 microcontroller:
    • Open the IDE on your computer. Go to the File menu in the top menu bar. Select the Preferences option. In the window that appears, type or copy/paste this text into the Additional boards manager URLs box: https://resource.heltec.cn/download/package_heltec_esp32_index.json and then click OK.
      Image of the Preferences window
    • Next, click on the Board Manager icon on the left.
      Image of the board manager icon location)
    • Type Heltec in the search box. The search results should show Heltec ESP32 Series Dev-boards. Click on the Install button to install this package of files. This will take a few minutes. You will see status messages in the output window at the bottom of the screen.
      Image of the search box and Install button
  3. Next, you will need to connect your ESP microcontroller:
    • Plug the ESP32 Wireless Tracker board into your computer using a USB-A to USB-C cable.
    • Go to the Tools menu in the top menu bar. Select the Board option, then Heltec ESP32 Series Dev Boards, then finally Wireless Tracker.
      Image of the board select menu
    • Again, go to the Tools menu in the top menu bar. Select the Port option, then select the port that most closely appears to be your ESP32 microcontroller. Often, there will be only one option. If the choices are not clear, ask you mentor or instructor for guidance.
  4. Finally, you will try to load a small program to see if the IDE and microcontroller are working together:
    • Delete all of the text in the main editor window, starting with the line void setup() { and continuing through the last } symbol. (As you will learn, every small character is important in code.)
    • Copy and paste this code into the editor window
        int count = 1;
      
        void setup() {
          Serial.begin(115200);
          Serial.println("Hello, World!");
        }
      
        void loop() {
          Serial.println(count);
          count++;
          delay(1000);
        }
      
    • Click the Upload icon at the top of the editor window. You should see status messages at the bottom of the screen as the IDE compiles and uploads your code.
      Image of Upload icon
    • Press Ctrl-Shift-M to open the serial monitor window. This is where messages from the microcontroller are displayed. Try to figure out how the messages in the serial monitor are caused by the code in the editor window.