diff --git a/app.py b/app.py deleted file mode 100644 index e0dc8a6ef38f4b5a441a21e018f2feb8a7507771..0000000000000000000000000000000000000000 --- a/app.py +++ /dev/null @@ -1,26 +0,0 @@ -from flask import Flask, render_template; -import serial; -import time; - -app = Flask(__name__) - -@app.route('/') -def index(): - return render_template('breath_plot.html') - -if __name__ == '__main__': - app.run(debug=True, host='0.0.0.0') - -#ser = serial.Serial('COM4', 112500, timeout=1) -#print(ser.name) -#ser.flushInput() - -#while True: -# try: -# ser.write(b'A') -# time.sleep(0.1) -# ser_bytes = ser.readline() -# print(ser_bytes) -# except KeyboardInterrupt: -# print("Keyboard Interrupt") -# break diff --git a/templates/breath_plot.html b/breath_plot.html similarity index 98% rename from templates/breath_plot.html rename to breath_plot.html index 3cc59a71b2ac21d58ef80f57a008b6e2ac7c1739..1c7caaa7801bc5715a0b6222f6a5ae38480fa19b 100644 --- a/templates/breath_plot.html +++ b/breath_plot.html @@ -28,7 +28,7 @@ Breath Plot: COVID-19 Respiration Analysis Software <!-- Load plotly.js into the DOM --> <script src='https://cdn.plot.ly/plotly-latest.min.js'></script> - <script src='./static/js/respiration_math.js'></script> + <script src='./js/respiration_math.js'></script> <title>Public Invention Respiration Analysis</title> @@ -189,7 +189,10 @@ an interactive or static analysis of a respiration. It's primary purpose is <!-- CONTROL PANEL START --> <div class="container-fluid" id="control_area"> - <div class="row"> + <div class="row" id="control-panel-hidden"> + <button type="button" class="btn btn-primary">SHOW CONTROLS</button> + </div> + <div class="row" id="control-panel-expanded"> <div class="col-6"> <div class="control-wrapper row"> <label class="col-2" for="control-mode">Mode:</label> @@ -579,7 +582,7 @@ var intervalID = null; // CONTROL PANEL VARIABLES START - +var controlsVisible = false; // CONTROL PANEL VARIABLES END @@ -1490,6 +1493,19 @@ $( document ).ready(function() { }); + $("#control-panel-hidden button").click(()=> { + console.log("show panel"); + if (controlsVisible){ + $("#control-panel-expanded").hide(); + controlsVisible = false; + } else { + $("#control-panel-expanded").show(); + controlsVisible = true; + } + }); + + $("#control-panel-expanded").hide(); + $("#control-mode").on("input", () => { var m = $("#control-mode").val(); if (m === "0"){ diff --git a/static/js/respiration_math.js b/js/respiration_math.js similarity index 100% rename from static/js/respiration_math.js rename to js/respiration_math.js diff --git a/simple_serial/simple_serial.ino b/simple_serial/simple_serial.ino deleted file mode 100644 index 59197afab8fba3b0292c95812c7d2d11400566f5..0000000000000000000000000000000000000000 --- a/simple_serial/simple_serial.ino +++ /dev/null @@ -1,18 +0,0 @@ -int incomingByte = 0; // for incoming serial data - -void setup() { - Serial.begin(112500); -} - -void loop() { - // put your main code here, to run repeatedly: - // reply only when you receive data: - if (Serial.available() > 0) { - // read the incoming byte: - incomingByte = Serial.read(); - - // say what you got: - Serial.print("I received: "); - Serial.println(incomingByte, DEC); - } -}