jordillonch / kids_lora_gps

This project aims to be a playground to learn ESP32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kids LoRaWAN GPS [WIP]

⚠ THIS PROJECT IS WIP ⚠

(some screen top lines are not working 😞)

Introduction

  • This project aims to be a playground to learn ESP32 + Espressif technology during the summer :)
  • The idea is to use an ESP32 kit with LoRa + GPS + battery capabilities that will send the GPS coordinates through LoRa. Then we will receive these coordinates with another ESP32 device with LoRa capabilities.

System

Hardware

Software

Work done

Features working

  • GPS
  • Screen SSD1306
  • LoRa
  • Battery

Tasks done

  • Get GPS position
  • Show GPS position in screen
  • Send GPS position via LoRa
  • Show sending position via LoRa in screen
  • Show battery status

How to build and flash

  • First, you will need to set up the Espressif environment. You can follow the Get Started.

Transmitter

  • Connect your device to the USB port.
    cd kids_lora_gps_tx
    idf.py -p /dev/ttyACM0 flash monitor
    

Configuration

  • Default configuration will work for LILYGO TTGO T-Beam V1.1 ESP32 but you can use another device. In that case, you should do a idf.py menuconfig and configure:
    • NMEA parser / UART RXD pin number
    • Component config / LoRa Configuration
    • Component config / LVGL configuration
    • Component config / LVGL TFT Display controller

Receiver

  • Connect your device to the USB port.
    cd kids_lora_gps_rx
    idf.py -p /dev/ttyACM0 flash monitor
    

Configuration

  • Default configuration will work for LILYGO TTGO T-Beam V1.1 ESP32 but you can use another device. In that case, you should do a idf.py menuconfig and configure:
    • Component config / LoRa Configuration
    • Component config / LVGL configuration
    • Component config / LVGL TFT Display controller

Tests

  • It is just a trial to test a component to learn how it works. Do not expect to see a lot of tests ;)

Unit test (Linux host)

  • No need for any device.
    cd components/gps/gps_cbor_coders/test/host_test
    idf.py build
    ./build/test_host_gps_cbor_coders.elf
    

Unit test (Target)

  • Connect your device to the USB port.
    cd components/gps/gps_cbor_coders/test/target_test
    idf.py -p /dev/ttyACM0 flash monitor
    

CLion

  • Follow this ESP-IDF Clion guideline
  • How to load rx, tx and tests CMakeLists.txt:
    • kids_lora_gps_rx:
      • Use the Project Tool Window to navigate to kids_lora_gps_rx/CMakeLists.txt and click with right mouse button and choose Load CMake Project.
    • kids_lora_gps_tx:
      • Use the Project Tool Window to navigate to kids_lora_gps_tx/CMakeLists.txt and click with right mouse button and choose Load CMake Project.
    • Tests:
      • Host test:
        • You will need an extra CMake profile:
          • Go to Settings - Build, Execution, Deployment > CMake. Add a new profile with and add the environment variable: IDF_TARGET=linux.
          • Remember to go to Tools - CMake - Reset Cache and Reload Project.
        • Use the Project Tool Window to navigate to components/gps/gps_cbor_coders/test/host_test/CMakeLists.txt and click with right mouse button and choose Load CMake Project.
      • Target test:
        • Use the Project Tool Window to navigate to components/gps/gps_cbor_coders/test/target_test/CMakeLists.txt and click with right mouse button and choose Load CMake Project.

Lessons learnt

  • Devices:
    • ESP32 + Espressif framework
    • GPS NEO-6M
    • Screen monochrome OLED SSD1306
    • LoRa module
    • Batter power management IC AXP192
  • Development environment, tools and frameworks:
    • Espressif
      • Application Level Tracing
      • Build System (components, Kconfig...)
      • Error Handling
      • Core Dump
      • Event Handling
      • Fatal Errors
      • JTAG Debugging
      • Unit test (Linux host = run in Linux)
      • Unit test (target = run in ESP32 device)
      • Wi-Fi + Provisioning
      • HTTP Server
      • Watchdogs
    • CLion
    • CMake
    • Cbor
    • FreeRTOS
  • Other learnings using examples:
    • OTA
    • AWS IoT
    • Steppers

About

This project aims to be a playground to learn ESP32

License:MIT License


Languages

Language:C 99.4%Language:Python 0.4%Language:Makefile 0.1%Language:CMake 0.1%Language:C++ 0.0%Language:Shell 0.0%