diff --git a/src/Python/flask/web/app.py b/src/Python/flask/web/app.py index a666754..59fe855 100644 --- a/src/Python/flask/web/app.py +++ b/src/Python/flask/web/app.py @@ -90,5 +90,14 @@ def database(): cursor.close() return str(rows) +def save_sensor_data(data): + db = get_db() + cursor = db.cursor() + sql = "INSERT INTO kobuki_data (data) VALUES (%s)" + value = data + cursor.execute(sql, (value,)) + db.commit() + cursor.close() + if __name__ == '__main__': app.run(debug=True, port=5000)