diff --git a/.vscode/settings.json b/.vscode/settings.json index c07614e..d5f2126 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,5 @@ "files.eol": "\n", "debug.openDebug": "neverOpen", "python.linting.enabled": false, - "ev3devBrowser.download.exclude": "{*.md,TODO,LICENSE,.github/*,.vscode/*,.gitignore}" + "ev3devBrowser.download.exclude": "{*.md,TODO,LICENSE,.github/*,.vscode/*,.gitignore,assets/*}" } diff --git a/main.py b/main.py index 02f1cd7..459dda0 100644 --- a/main.py +++ b/main.py @@ -7,18 +7,21 @@ from pybricks.tools import print, StopWatch from charlieosx import CharlieOSX -### things, I'm sometimes using to test things - can be ignored -""" -lineMap = {'height' : 300, 'width' : 1000, - 'from' : (1, 1), 'to' : (1, 4), - 'obstacles' : [((2, 1), (4, 1))]} +# os = CharlieOSX('config.cfg', 'settings.json', '') -tools.doIntersect(lineMap)""" -### example code to start CharlieOSX and it's menu-system -os = CharlieOSX('config.cfg', 'settings.json', '') -os.ui.mainLoop() +import picoweb -### example for driving straight -os.robot.straight(100, 20, 0) \ No newline at end of file +app = picoweb.WebApp("app") + +@app.route("/") +def index(req, resp): + yield from picoweb.start_response(resp, content_type = "text/html") + + htmlFile = open('site.html', 'r') + + for line in htmlFile: + yield from resp.awrite(line) + +app.run(debug=True, host = "192.168.178.52") \ No newline at end of file diff --git a/site.html b/site.html new file mode 100644 index 0000000..a68500c --- /dev/null +++ b/site.html @@ -0,0 +1,22 @@ +
sensor | +value | +timestamp | +
---|---|---|
temperature | +10 | +10:00 | +
temperature | +11 | +11:00 | +
luminosity | +11 | +11:00 | +