From 0fd8bce6926751eaa4487b76ad709460dbb6751d Mon Sep 17 00:00:00 2001 From: xAlpharax <42233094+xAlpharax@users.noreply.github.com> Date: Sun, 5 Nov 2023 08:15:28 +0200 Subject: 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 --- LINKS.md | 3 ++- TODO.md | 4 +++- client_app_flutter/lib/main.dart | 22 +++++++++++++++++++--- images/DHT-temp-hum-sensor.jpg | Bin 0 -> 660535 bytes images/DSM501A-air-dust-smoke-sensor.jpg | Bin 0 -> 182928 bytes images/ESP32 Pinout Diagram.png | Bin 125943 -> 0 bytes images/ESP32 Specs.png | Bin 99493 -> 0 bytes images/ESP32-Pinout-1.jpg | Bin 61663 -> 0 bytes images/ESP32-Pinout-Diagram-board.png | Bin 0 -> 125943 bytes images/ESP32-Pinout-board.jpg | Bin 0 -> 61663 bytes images/ESP32-Specs.png | Bin 0 -> 99493 bytes images/MQ135-gas-sensor.jpg | Bin 0 -> 305637 bytes images/SBC-NodeMCU-ESP32-01-board.png | Bin 0 -> 2317872 bytes images/cpp-logo.png | Bin 0 -> 4662 bytes images/dart-game-logo.png | Bin 0 -> 39759 bytes images/dart-kotlin-swift-logos.png | Bin 0 -> 127375 bytes images/dart-logo.png | Bin 0 -> 20753 bytes images/firebase-logo.png | Bin 0 -> 31679 bytes images/flutter-logo.png | Bin 0 -> 21232 bytes images/python-logo.png | Bin 0 -> 3219 bytes presentation/sent_markdown_presentation | 0 21 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 images/DHT-temp-hum-sensor.jpg create mode 100644 images/DSM501A-air-dust-smoke-sensor.jpg delete mode 100644 images/ESP32 Pinout Diagram.png delete mode 100644 images/ESP32 Specs.png delete mode 100644 images/ESP32-Pinout-1.jpg create mode 100644 images/ESP32-Pinout-Diagram-board.png create mode 100644 images/ESP32-Pinout-board.jpg create mode 100644 images/ESP32-Specs.png create mode 100644 images/MQ135-gas-sensor.jpg create mode 100644 images/SBC-NodeMCU-ESP32-01-board.png create mode 100644 images/cpp-logo.png create mode 100644 images/dart-game-logo.png create mode 100644 images/dart-kotlin-swift-logos.png create mode 100644 images/dart-logo.png create mode 100644 images/firebase-logo.png create mode 100644 images/flutter-logo.png create mode 100644 images/python-logo.png create mode 100644 presentation/sent_markdown_presentation 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 { - 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 { // 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 { 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 Binary files /dev/null and b/images/DHT-temp-hum-sensor.jpg 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 Binary files /dev/null and b/images/DSM501A-air-dust-smoke-sensor.jpg differ diff --git a/images/ESP32 Pinout Diagram.png b/images/ESP32 Pinout Diagram.png deleted file mode 100644 index eb0819d..0000000 Binary files a/images/ESP32 Pinout Diagram.png and /dev/null differ diff --git a/images/ESP32 Specs.png b/images/ESP32 Specs.png deleted file mode 100644 index c1f6b92..0000000 Binary files a/images/ESP32 Specs.png and /dev/null differ diff --git a/images/ESP32-Pinout-1.jpg b/images/ESP32-Pinout-1.jpg deleted file mode 100644 index 9f041a6..0000000 Binary files a/images/ESP32-Pinout-1.jpg and /dev/null differ diff --git a/images/ESP32-Pinout-Diagram-board.png b/images/ESP32-Pinout-Diagram-board.png new file mode 100644 index 0000000..eb0819d Binary files /dev/null and b/images/ESP32-Pinout-Diagram-board.png differ diff --git a/images/ESP32-Pinout-board.jpg b/images/ESP32-Pinout-board.jpg new file mode 100644 index 0000000..9f041a6 Binary files /dev/null and b/images/ESP32-Pinout-board.jpg differ diff --git a/images/ESP32-Specs.png b/images/ESP32-Specs.png new file mode 100644 index 0000000..c1f6b92 Binary files /dev/null and b/images/ESP32-Specs.png differ diff --git a/images/MQ135-gas-sensor.jpg b/images/MQ135-gas-sensor.jpg new file mode 100644 index 0000000..41397ad Binary files /dev/null and b/images/MQ135-gas-sensor.jpg 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 Binary files /dev/null and b/images/SBC-NodeMCU-ESP32-01-board.png differ diff --git a/images/cpp-logo.png b/images/cpp-logo.png new file mode 100644 index 0000000..1bb7222 Binary files /dev/null and b/images/cpp-logo.png differ diff --git a/images/dart-game-logo.png b/images/dart-game-logo.png new file mode 100644 index 0000000..df139e3 Binary files /dev/null and b/images/dart-game-logo.png differ diff --git a/images/dart-kotlin-swift-logos.png b/images/dart-kotlin-swift-logos.png new file mode 100644 index 0000000..70e1200 Binary files /dev/null and b/images/dart-kotlin-swift-logos.png differ diff --git a/images/dart-logo.png b/images/dart-logo.png new file mode 100644 index 0000000..244ad77 Binary files /dev/null and b/images/dart-logo.png differ diff --git a/images/firebase-logo.png b/images/firebase-logo.png new file mode 100644 index 0000000..cb5a213 Binary files /dev/null and b/images/firebase-logo.png differ diff --git a/images/flutter-logo.png b/images/flutter-logo.png new file mode 100644 index 0000000..8c0d456 Binary files /dev/null and b/images/flutter-logo.png differ diff --git a/images/python-logo.png b/images/python-logo.png new file mode 100644 index 0000000..398ed63 Binary files /dev/null and b/images/python-logo.png differ diff --git a/presentation/sent_markdown_presentation b/presentation/sent_markdown_presentation new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3