aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2017-08-11-simple-iot-application.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/posts/2017-08-11-simple-iot-application.md')
-rw-r--r--content/posts/2017-08-11-simple-iot-application.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/content/posts/2017-08-11-simple-iot-application.md b/content/posts/2017-08-11-simple-iot-application.md
index b48f2fb..b34fe6b 100644
--- a/content/posts/2017-08-11-simple-iot-application.md
+++ b/content/posts/2017-08-11-simple-iot-application.md
@@ -27,7 +27,7 @@ Step 1. and 3. will share the same web application. One route will be dedicated
27 27
28Schema below represents what we will try to achieve and how different parts correlates to each other. 28Schema below represents what we will try to achieve and how different parts correlates to each other.
29 29
30![Overview](/iot-application/simple-iot-application-overview.svg) 30![Overview](/assets/iot-application/simple-iot-application-overview.svg)
31 31
32## Simple Python API 32## Simple Python API
33 33
@@ -148,11 +148,11 @@ To run this simply go to folder containing python file and run ```python webapp.
148 148
149After testing the service with Restlet Client you should be able to view your data in a database file ```data.db```. 149After testing the service with Restlet Client you should be able to view your data in a database file ```data.db```.
150 150
151![REST settings example](/iot-application/iot-rest-example.png) 151![REST settings example](/assets/iot-application/iot-rest-example.png)
152 152
153You can also check the contents of new database file by using desktop client for SQLite → [DB Browser for SQLite](http://sqlitebrowser.org/). 153You can also check the contents of new database file by using desktop client for SQLite → [DB Browser for SQLite](http://sqlitebrowser.org/).
154 154
155![SQLite database example](/iot-application/iot-sqlite-db.png) 155![SQLite database example](/assets/iot-application/iot-sqlite-db.png)
156 156
157Table structure is as simple as it can be. We have ts (timestamp) and value (value from Arduino). As you can see timestamp is generated on API side. If you would happen to have atomic clock on Arduino it would be then better to generate and send timestamp with the value. This would be particularity useful if we would be collecting sensor data at a higher frequency and then sending this data in bulk to API. 157Table structure is as simple as it can be. We have ts (timestamp) and value (value from Arduino). As you can see timestamp is generated on API side. If you would happen to have atomic clock on Arduino it would be then better to generate and send timestamp with the value. This would be particularity useful if we would be collecting sensor data at a higher frequency and then sending this data in bulk to API.
158 158
@@ -469,9 +469,9 @@ If everything goes well you should be seeing new data-points rendered on chart e
469 469
470If you navigate to ```http://0.0.0.0:5000``` you should see rendered chart as shown on picture below. 470If you navigate to ```http://0.0.0.0:5000``` you should see rendered chart as shown on picture below.
471 471
472![Application output](/iot-application/iot-app-output.png) 472![Application output](/assets/iot-application/iot-app-output.png)
473 473
474Complete application with all the code is available for [download](/iot-application/simple-iot-application.zip). 474Complete application with all the code is available for [download](/assets/iot-application/simple-iot-application.zip).
475 475
476## Conclusion 476## Conclusion
477 477