Introduction

This is a project created for StormHacks 2024.

Inspiration

Thanks to Major League Hacking, our team was able to borrow a Leap Motion during the hackathon. Therefore, we decided to learn how to use this Leap Motion, and this is what our team came up with: Drawing using your hand motion. LeapDoodle :)

What it does

Have you ever used Microsoft Paint? Have you ever experienced the frustration of not being able to draw correctly using your mouse? I am honored to present to you LeapDoodle, a drawing app using your hand :)

Here are the features of LeapDoodle that we are proud of:

  • ✅ Black Canvas
  • ✅ Super complex ways to draw something on the canvas depending on how you move your hand.
  • ✅ If you seek challenges in the creation of art, this is for you :)

How we built it

  • The Leap Motion we used for this hackathon employs UltraLeap, which uses C as the backend. We used their API leapc-python-bindings to call the backend. Then, we ran a pygame window to display the logic when users interact with the app. This was run on Python 3.11.

How to draw

  • Use your right hand to draw. If you pinch your right hand, the circle will get smaller, and the line you draw will have a smaller width. If your index finger is far from your thumb, the circle will get bigger.
  • To start drawing, pinch your index finger and thumb together. To enter erase mode, pinch your index, middle finger, and thumb together. The radius of the circle will increase based on how you pinch with your right hand.
  • Visit the demo video for how to use it: https://www.youtube.com/watch?v=nuOOPolxiIU

What we learned

  • Using the Leap Motion controller to record hand motions.
  • The struggle when working with hardware. There is a lot going on under the hood to make everything work perfectly. Through this project, we realized that we still have much to learn if we want to work with hardware in the future.

Challenges we ran into

  • One of the biggest challenges in this hackathon was time. We had to deliver a Minimum Viable Product within a 24-hour period. There is so much more that I want to implement for the app, but I had to focus on creating a functioning product first. If I have time in the future, I want to implement more features so it can function like a full version of Microsoft Paint.

Accomplishments that we're proud of

  • Connecting to a Leap Motion controller and recording data.
  • Learning about the API from UltraLeap.

Build Instructions

  • Since this is my first time working with actual hardware, I realize that a lot have to factors in to be able to make the program run smoothly, so please forgive my really long build instruction.
  • You will also need a leap-motion controller.
  • Make sure you have the Leap Motion SDK downloaded
  • Clone our git repository: https://github.com/qvd808/stormhack-2024
  • Run
    cd leapc-python-bindings
  • Make sure you have a python environment set ups (It is good if you have a virtual environment). Then, run:
    pip install -r requirements.txt
    python -m build leapc-cffi
    pip install leapc-cffi/dist/leapc_cffi-0.0.1.tar.gz
    pip install -e leapc-python-api
    pip install pygame
  • Run
    python main.py

Built With

Share this project:

Updates