TGU

Esp32 Motion

This article is about using micropython to setup two ESP32 development boards with a sparkfun motion board to capture and display pitch, roll, yaw and GPS coordinates. One of the ESP32 boards displays the data sent via wifi from the second ESP32 boards which is connected to the sparkfun motion board. The three boards used in this project are detailed in The Devices section. What this means is that the display board will show how much fun the board with the IMU / GPS is having from a calm collected place.

Index

The Devices

The Repositories

The github repositories used are ...

  • Micropython Drivers
    • Branch: *master
    • Commit being used: f812394c33b0484f4bd24ef101c3c9250a74ab24
    • Files used ...
      • drivers/sdcard/sdcard.py
      • drivers/display/ssd1306.py
  • Micropython Fusion
    • Branch: *master
    • Commit being used: fe72a6870357c8f9b1cae78b98564412382943d9
    • Files used ...
      • fusion_async.py
      • deltat.py
  • Accelerometer + Gyro ( LSM9DDS1 )
    • Branch: *sparkfun
    • Commit being used: 232073381dd7d41eb33d10d4f460ae58408ab92e
    • Files used ...
      • raspi-hat/lsm9ds1.py
  • Micropython Lib
    • Branch: *master
    • Commit being used: b89114c8345e15d360c3707493450805c114bc8c
    • Files used ...
      • uasyncio/uasyncio/__init__.py
      • uasyncio.core/uasyncio/core.py Modified
      • uasyncio.queues/uasyncio/queues.py
      • uasyncio.synchro/uasyncio/synchro.py
      • uasyncio.queues/uasyncio/queues.py
  • Micropython Async
    • Branch: *master
    • Commit being used: 7b802c919ef0cd55dda8d402d07a7735af8e7819
    • Files used ...
      • asyn.py
  • TGU's Code ( Coming soon )
    • Branch: *master

The Good the Bad and the Ugly

The Ugly

Lets start with the ugly parts of this project. Firstly, there will be allot of assumed knowledge and sections where valuable information will be either missing or just damn right wrong. Another grotesquely ugly part of this project is its feet, no sorry, its has no feet. It is its lack of coherent git collaboration. As you might of noticed by the list of repo's that this project should of included all of these as submodules. But guess what? That never happened. Here at TGU we see laziness as a quality that should be practised to be perfected.

The Bad

This is TGU's first embedded project with Micropython that has real world applications which in lay man's terms means its untested, untrustworthy flakey and bloated.

The Good

Its works! :) Photo's and videos will hopefully follow in the near distant future showing how it all plugs together and the reaction times using the Fusion module with async. Needles to say TGU was pleasantly surprised to see the results and foreseer's this project being refined and improved.

The IMU

The Display

Using Fusion

Using Coroutines

The Network

The Patches

Putting it all Together