def setup(): motor.setup() return redirect('/')
def reset(): motor.destroy() motor.setup() return redirect('/')
from sqlalchemy import create_engine import statistics import json import sys with open('../secrets.json') as f: secrets = json.load(f) #### ## init #### # motors motor.setup() # accelerometer accel = metrics.Adafruit_ADXL345() # object recognition app = ClarifaiApp(api_key=secrets['CLARIFAI_API_KEY']) model = app.public_models.general_model # app app = Flask(__name__) app.config['DEBUG'] = True #### ## MOVE API #### @app.route('/api/move/forward', methods=['GET']) def forward():