diff --git a/.gitignore b/.gitignore
index 908a659..7482133 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,4 +16,5 @@ src/C++/Driver/Makefile
src/C++/Driver/vgcore*
src/C++/Driver/cmake_install.cmake
src/C++/Driver/Makefile
-src/Python/flask/web/_pycache_
\ No newline at end of file
+src/Python/flask/web/_pycache_
+venv
\ No newline at end of file
diff --git a/src/Python/flask/web/app.py b/src/Python/flask/web/app.py
index 5b555b0..4bcc928 100644
--- a/src/Python/flask/web/app.py
+++ b/src/Python/flask/web/app.py
@@ -1,4 +1,5 @@
-from flask import Flask, render_template
+from flask import Flask, request, render_template
+import paho.mqtt.publish as publish
app = Flask(__name__)
@@ -6,12 +7,11 @@ app = Flask(__name__)
def index():
return render_template('index.html')
-@app.route('/control', methods=['POST'])
-def control():
- return("hello")
-
+@app.route('/move', methods=['POST'])
+def move():
+ direction = request.form['direction']
+ publish.single("home/commands", direction, hostname="ishak.ishakpi.ddns.net")
+ return "Message sent"
if __name__ == '__main__':
- app.run(debug=True)
-
-
+ app.run(debug=True)
\ No newline at end of file
diff --git a/src/Python/flask/web/templates/index.html b/src/Python/flask/web/templates/index.html
index c32b2d8..0ab2680 100644
--- a/src/Python/flask/web/templates/index.html
+++ b/src/Python/flask/web/templates/index.html
@@ -4,13 +4,15 @@