summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-11-05 08:15:28 +0200
committerxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-11-05 08:15:28 +0200
commit0fd8bce6926751eaa4487b76ad709460dbb6751d (patch)
tree17afa7d78297e3b6bd6b455881f095bf3455b0b0
parent093d847606d5fa7d613417593b3201400ec8cd17 (diff)
Prepared for presentation and meeting the deadline (no way).
Changes to be committed: modified: LINKS.md modified: TODO.md modified: client_app_flutter/lib/main.dart new file: images/DHT-temp-hum-sensor.jpg new file: images/DSM501A-air-dust-smoke-sensor.jpg renamed: images/ESP32 Pinout Diagram.png -> images/ESP32-Pinout-Diagram-board.png renamed: images/ESP32-Pinout-1.jpg -> images/ESP32-Pinout-board.jpg renamed: images/ESP32 Specs.png -> images/ESP32-Specs.png new file: images/MQ135-gas-sensor.jpg new file: images/SBC-NodeMCU-ESP32-01-board.png new file: images/cpp-logo.png new file: images/dart-game-logo.png new file: images/dart-kotlin-swift-logos.png new file: images/dart-logo.png new file: images/firebase-logo.png new file: images/flutter-logo.png new file: images/python-logo.png new file: presentation/sent_markdown_presentation
-rw-r--r--LINKS.md3
-rw-r--r--TODO.md4
-rw-r--r--client_app_flutter/lib/main.dart22
-rw-r--r--images/DHT-temp-hum-sensor.jpgbin0 -> 660535 bytes
-rw-r--r--images/DSM501A-air-dust-smoke-sensor.jpgbin0 -> 182928 bytes
-rw-r--r--images/ESP32-Pinout-Diagram-board.png (renamed from images/ESP32 Pinout Diagram.png)bin125943 -> 125943 bytes
-rw-r--r--images/ESP32-Pinout-board.jpg (renamed from images/ESP32-Pinout-1.jpg)bin61663 -> 61663 bytes
-rw-r--r--images/ESP32-Specs.png (renamed from images/ESP32 Specs.png)bin99493 -> 99493 bytes
-rw-r--r--images/MQ135-gas-sensor.jpgbin0 -> 305637 bytes
-rw-r--r--images/SBC-NodeMCU-ESP32-01-board.pngbin0 -> 2317872 bytes
-rw-r--r--images/cpp-logo.pngbin0 -> 4662 bytes
-rw-r--r--images/dart-game-logo.pngbin0 -> 39759 bytes
-rw-r--r--images/dart-kotlin-swift-logos.pngbin0 -> 127375 bytes
-rw-r--r--images/dart-logo.pngbin0 -> 20753 bytes
-rw-r--r--images/firebase-logo.pngbin0 -> 31679 bytes
-rw-r--r--images/flutter-logo.pngbin0 -> 21232 bytes
-rw-r--r--images/python-logo.pngbin0 -> 3219 bytes
-rw-r--r--presentation/sent_markdown_presentation0
18 files changed, 24 insertions, 5 deletions
diff --git a/LINKS.md b/LINKS.md
index e31a329..d3ea6c4 100644
--- a/LINKS.md
+++ b/LINKS.md
@@ -18,8 +18,9 @@ https://cassandra.apache.org/_/quickstart.html -- i like this containarization
https://graphql.org/ - graphs dbs
https://www.gradio.app/ - another contender that was considered (somewhat, but not exactly what was needed)
-FORGET THAT ; DO FIREBASE --> Flutter for android, ios, web --> IS WORKING (doing)
+FORGET THAT ; DO FIREBASE --> Flutter for android, ios, web --> IS WORKING (doing -> deadline)
https://firebase.google.com/docs/flutter/setup --> AYYYYYY
+https://firebase.google.com/docs/database/flutter/read-and-write -- real time database with firebase (rtdb)
SOME OTHER THINGS I VE SEEN:
diff --git a/TODO.md b/TODO.md
index f595867..03867ba 100644
--- a/TODO.md
+++ b/TODO.md
@@ -6,7 +6,9 @@ make an api interface (esp32 can use curl's and stuff) -- SORTOF -- arduino libs
store the data on a mock server that can be accessed with requests (rest, crud) --> alphara.art ORRRR firebase:) --- firebase works (doing)
-RIGHT NOW I JUST WANT A DISPLAY OF JSON IN MY APPLICATION
+RIGHT NOW I JUST WANT A DISPLAY OF JSON IN MY APPLICATION (doing)
+
+--- future - won t meet the deadline :( ---
somehow integrate that continuously with time series data forcasting and other AI/ML predictions -- need python for making AND condensing an ML model (future, quite possibly unattainable rn)
incorporate pretty graphs and predict future behaviour/forcasting of those data-points to show the urgency for measure-taking (also future..)
diff --git a/client_app_flutter/lib/main.dart b/client_app_flutter/lib/main.dart
index 8502127..957b125 100644
--- a/client_app_flutter/lib/main.dart
+++ b/client_app_flutter/lib/main.dart
@@ -64,7 +64,8 @@ class MyHomePage extends StatefulWidget {
}
class _MyHomePageState extends State<MyHomePage> {
- FirebaseDatabase database = FirebaseDatabase.instance;
+ // FirebaseDatabase database = FirebaseDatabase.instance;
+ // DatabaseReference ref = FirebaseDatabase.instance.ref().child('temperature');
// final ref = FirebaseDatabase.instance.ref();
int _counter = 0;
@@ -76,7 +77,14 @@ class _MyHomePageState extends State<MyHomePage> {
// so that the display can reflect the updated values. If we changed
// _counter without calling setState(), then the build method would not be
// called again, and so nothing would appear to happen.
- _counter++;
+ // ref.onValue.listen(
+ // (event) {
+ // setState(() {
+ // _counter = event.snapshot.value as int;
+ // });
+ // },
+ // );
+ // _counter++;
// final snapshot = await ref.child('temperature').get();
// final snapshot = database.ref().child('temperature').get();
// if (snapshot.exists) {
@@ -93,7 +101,15 @@ class _MyHomePageState extends State<MyHomePage> {
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
- //
+
+ DatabaseReference ref = FirebaseDatabase.instance.ref().child('temperature');
+ ref.onValue.listen(
+ (event) {
+ setState(() {
+ _counter = event.snapshot.value as int;
+ });
+ },
+ );
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
diff --git a/images/DHT-temp-hum-sensor.jpg b/images/DHT-temp-hum-sensor.jpg
new file mode 100644
index 0000000..71bbd76
--- /dev/null
+++ b/images/DHT-temp-hum-sensor.jpg
Binary files differ
diff --git a/images/DSM501A-air-dust-smoke-sensor.jpg b/images/DSM501A-air-dust-smoke-sensor.jpg
new file mode 100644
index 0000000..e95db78
--- /dev/null
+++ b/images/DSM501A-air-dust-smoke-sensor.jpg
Binary files differ
diff --git a/images/ESP32 Pinout Diagram.png b/images/ESP32-Pinout-Diagram-board.png
index eb0819d..eb0819d 100644
--- a/images/ESP32 Pinout Diagram.png
+++ b/images/ESP32-Pinout-Diagram-board.png
Binary files differ
diff --git a/images/ESP32-Pinout-1.jpg b/images/ESP32-Pinout-board.jpg
index 9f041a6..9f041a6 100644
--- a/images/ESP32-Pinout-1.jpg
+++ b/images/ESP32-Pinout-board.jpg
Binary files differ
diff --git a/images/ESP32 Specs.png b/images/ESP32-Specs.png
index c1f6b92..c1f6b92 100644
--- a/images/ESP32 Specs.png
+++ b/images/ESP32-Specs.png
Binary files differ
diff --git a/images/MQ135-gas-sensor.jpg b/images/MQ135-gas-sensor.jpg
new file mode 100644
index 0000000..41397ad
--- /dev/null
+++ b/images/MQ135-gas-sensor.jpg
Binary files differ
diff --git a/images/SBC-NodeMCU-ESP32-01-board.png b/images/SBC-NodeMCU-ESP32-01-board.png
new file mode 100644
index 0000000..b002fa2
--- /dev/null
+++ b/images/SBC-NodeMCU-ESP32-01-board.png
Binary files differ
diff --git a/images/cpp-logo.png b/images/cpp-logo.png
new file mode 100644
index 0000000..1bb7222
--- /dev/null
+++ b/images/cpp-logo.png
Binary files differ
diff --git a/images/dart-game-logo.png b/images/dart-game-logo.png
new file mode 100644
index 0000000..df139e3
--- /dev/null
+++ b/images/dart-game-logo.png
Binary files differ
diff --git a/images/dart-kotlin-swift-logos.png b/images/dart-kotlin-swift-logos.png
new file mode 100644
index 0000000..70e1200
--- /dev/null
+++ b/images/dart-kotlin-swift-logos.png
Binary files differ
diff --git a/images/dart-logo.png b/images/dart-logo.png
new file mode 100644
index 0000000..244ad77
--- /dev/null
+++ b/images/dart-logo.png
Binary files differ
diff --git a/images/firebase-logo.png b/images/firebase-logo.png
new file mode 100644
index 0000000..cb5a213
--- /dev/null
+++ b/images/firebase-logo.png
Binary files differ
diff --git a/images/flutter-logo.png b/images/flutter-logo.png
new file mode 100644
index 0000000..8c0d456
--- /dev/null
+++ b/images/flutter-logo.png
Binary files differ
diff --git a/images/python-logo.png b/images/python-logo.png
new file mode 100644
index 0000000..398ed63
--- /dev/null
+++ b/images/python-logo.png
Binary files differ
diff --git a/presentation/sent_markdown_presentation b/presentation/sent_markdown_presentation
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/presentation/sent_markdown_presentation