Skip to content
Mayunk Kulkarni edited this page Jun 2, 2024 · 1 revision

Picomotion

This repository/project aims to leverage a custom waveshare component using the onboard IMU and LCD to provide motion metrics to the user. I will try to document all the hardware and software links that I use in order for successful replication for folks who are interested in the project. Please do not expect complete information as I this mainly just a hobby in my perspective.

The main aim of the project is to ultimately make the RP2040-LCD-1.28 look like this:

picomotion

Table of Contents

  1. Introduction
  2. Hardware Requirements
  3. Software Requirements
  4. Installation
  5. Usage
  6. Project Structure
  7. Configuration
  8. Troubleshooting
  9. Contributing
  10. License
  11. Acknowledgemenets

Introduction

The RP2040 is a versatile microcontroller with heaps of documentation. The Waveshare RP2040-LCD-1.28 is a custom hardware that leverages the various advantages of developing on RP2040 by attaching a circular LCD and a IMU to the RP2040. This project aims to utilize both these components in the system and aims to setup a device that can use these components to display motion metrics. In addition to this, this project also aims to leverage CI for regular testing and builds.

Additional parts of this project may include adding sensors and batteries to the Waveshare but that may take more time.

Hardware Requirements

  1. RP2040-LCD-1.28
  2. Picoprobe
  3. Header convertors + wires to connect picoprobe to system

Software Requirements

  1. Follow the instructions on Dockerfile to understand full requirements
  2. pico-sdk
  3. this repository
  4. openocd for RP2040 follow these steps!
  5. docker engine (not needed but helpful)

Installation

First run the Dockerfile using the following:

docker buildx build --platform linux/amd64 -t picomotion .

This may require additional docker configuration to get buildx to run.

mkdir -p ~/.docker
echo '{"experimental": "enabled"}' > ~/.docker/config.json

Try this out to see if the entire test suite runs on the system on docker. Run the requirements as mentioned in the docker in your OS and run

./builder.sh -c -d -f This should clean, set the build to debug and flash the RP2040. You can check the output with the serial monitor of your choice. I use: nanocom -p /dev/cu.<pico-port> -c k

For debug run this on one window and enter the SWD port (3333) using gdb or lldb: $ openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"

Usage

flash and use

Project Structure

project-root/
├── CMakeLists.txt
├── src/
│   ├── main.c
│   └── ...
├── inc/
│   └── ...
├── lib/
|	└── ...
├── Dockerfile
└── ...

Configuration

Currently only one configuration is supported which is the waveshare component as shown.

Troubleshooting

WIP

Contributing

WIP

License

MIT License

Acknowledgements