brodigan-e / capstone-POV

NEU Capstone Project
MIT License
2 stars 1 forks source link

Add motor web API changes from the RPI #25

Open jbewing opened 3 years ago

jbewing commented 3 years ago

This PR adds some changes that were on the RPI, but not yet tracked in git. There are some changes that add an extremely rudimentary and hacky Web API for controlling the motor (i.e. somewhat of a solution to #7). I'm going to clean these up a bit before hopefully merging them.

Usage:

# enable motor with "low" speed
curl -X POST http://127.0.0.1:5000/api/motor/l
# run motor
curl -X POST http://127.0.0.1:5000/api/motor/r
# stop motor
curl -X POST http://127.0.0.1:5000/api/motor/e
# Note: Stop motor is a state-ful operation and requires that the entire flask server be restarted before using the motor API again

cc @DarkAce65