element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Forum Monitoring water level indicator using mobile app
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 2 replies
  • Answers 1 answer
  • Subscribers 505 subscribers
  • Views 1450 views
  • Users 0 members are here
  • internet_of_things
  • programming
  • cloud
  • iot
  • android app
Related

Monitoring water level indicator using mobile app

zeyad
zeyad over 1 year ago

I'm trying to make an app for monitoring water level using flutter on android studio (hedge hog). What I understand is that the work I am doing lies in an IoT category. I have made an UI for water level indicator. I also know about blynk app. Point is I want to make an app just like blynk that resembles my UI that I made, so that I can monitor water level. I have also done work on esp module. i have controlled Leds and relays using Esp module. The UI of mobile app has different types of features, but what I want to achieve is how to recieve/send data between esp and mobile app. One thing I know that I have to use an app like blynk app, but I don't understand how to make.

what I understand is listed below: Basic knowledge of Flutter so that I can make a UI. Understanding of Esp module to control Leds and relays

Following is my code of UI

import 'package:flutter/material.dart';

class RowWithTwoColumns extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          body: Container(
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceAround,
              children: [
                Column(
                  mainAxisAlignment: MainAxisAlignment.start,
                  children: [
                    Transform.translate(
                      offset: const Offset(20, 40),
                      child:
                          //Image.asset('assets/images/blue_1.png',width: 30,),),
                          Image.asset(
                            'assets/images/blue_1.png',
                            width: 30,
                          ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 80),
                      child: Image.asset(
                        'assets/images/green.png',
                        width: 30,
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 120),
                      child: Image.asset(
                        'assets/images/green.png',
                        width: 30,
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 160),
                      child: Image.asset(
                        'assets/images/green.png',
                        width: 30,
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 200),
                      child: Image.asset(
                        'assets/images/red_1.png',
                        width: 30,
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 240),
                      child: Image.asset(
                        'assets/images/red_1.png',
                        width: 30,
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 280),
                      child: Image.asset(
                        'assets/images/red_1.png',
                        width: 30,
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 300),
                      child: Text(
                        'WATER\nLEVEL',
                        textAlign: TextAlign.center,
                      ),
                    ),
                  ],
                ),
                Column(
                  mainAxisAlignment: MainAxisAlignment.start,
                  children: [
                    Transform.translate(
                      offset: const Offset(20, 40),
                      child: Text(
                        '100 %',
                        style: TextStyle(fontSize: 20),
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 80),
                      child: Text(
                        '90 %',
                        style: TextStyle(fontSize: 20),
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 123),
                      child: Text(
                        '75 %',
                        style: TextStyle(fontSize: 20),
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 163),
                      child: Text(
                        '60 %',
                        style: TextStyle(fontSize: 20),
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 204),
                      child: Text(
                        '45 %',
                        style: TextStyle(fontSize: 20),
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 243),
                      child: Text(
                        '30 %',
                        style: TextStyle(fontSize: 20),
                      ),
                    ),
                    Transform.translate(
                      offset: const Offset(20, 285),
                      child: Text(
                        '15 %',
                        style: TextStyle(fontSize: 20),
                      ),
                    ),
                  ],
                ),
                Column(mainAxisAlignment: MainAxisAlignment.start, children: [
                  Transform.translate(
                    offset: const Offset(0, 32),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 55),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 75),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 98),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 120),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 137),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 162),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 175),
                    child: Text(
                      'ON \n NOTIFY',
                      textAlign: TextAlign.center,
                    ),
                  ),
                ]),
                Column(mainAxisAlignment: MainAxisAlignment.start, children: [
                  Transform.translate(
                    offset: const Offset(0, 32),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 55),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 75),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 98),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 120),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 137),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 162),
                    child: SwitchScreen(),
                  ),
                  Transform.translate(
                    offset: const Offset(0, 175),
                    child: Text(
                      'OFF \n NOTIFY',
                      textAlign: TextAlign.center,
                    ),
                  ),
                ]),
              ],
            ),
          ),
          appBar: AppBar(
            title: Text(
              'Water Level Indicator',
              style: TextStyle(color: Colors.white),
            ),
            backgroundColor: Colors.blueAccent,
            centerTitle: true,
          )),
    );
  }
}

class SwitchScreen extends StatefulWidget {
  @override
  SwitchClass createState() => new SwitchClass();
}
class SwitchClass extends State {
  bool isSwitched = false;

  void toggleSwitch(bool value) {
    if (isSwitched == false) {
      setState(() {
        isSwitched = true;
      });
    } else {
      setState(() {
        isSwitched = false;
      });
    }
  }
  @override
  Widget build(BuildContext context) {
    return Column(mainAxisAlignment: MainAxisAlignment.center, children: [
      Transform.scale(
          scale: 1,
          child: Switch(
            onChanged: toggleSwitch,
            value: isSwitched,
          )),
    ]);
  }
}
imageImage of my UI

I have tried to get an idea of creating alternative of blynk app using different platforms including the following tutorial whose link I'm sharing but since I'm beginner in esp and cloud that's why I found it difficult to grasp. https://www.instructables.com/Build-Your-Own-IoT-Platform-Using-Nodejs-and-ESP82/

If any of the respected member could give me a line of action so I would be glad

  • Sign in to reply
  • Cancel

Top Replies

  • shabaz
    shabaz over 1 year ago +2 suggested
    Hi, If you're after an IoT solution, then a key bit that's currently missing is the cloud portion. Ordinarily, the ESP32 would be programmed to transmit the water level to an IoT platform in the cloud…
  • dougw
    dougw over 1 year ago +2
    Here is a bit of a guide to have a Flutter app talk to an ESP32:: https://www.dhiwise.com/post/building-a-temperature-and-humidity-monitoring-system-using-flutter An alternative is to make the ESP32…
Parents
  • dougw
    0 dougw over 1 year ago

    Here is a bit of a guide to have a Flutter app talk to an ESP32::

    https://www.dhiwise.com/post/building-a-temperature-and-humidity-monitoring-system-using-flutter

    An alternative is to make the ESP32 do all the work of hosting a web server, so your mobile device simply accesses the data using a browser:

    https://randomnerdtutorials.com/esp32-web-server-gauges/

    https://www.technolabcreation.com/esp32-weather-station-display-the-sensor-readings-on-a-web-server/

    https://www.electronicwings.com/esp32/analog-gauge-temperature-reading-using-esp32-server

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • dougw
    0 dougw over 1 year ago

    Here is a bit of a guide to have a Flutter app talk to an ESP32::

    https://www.dhiwise.com/post/building-a-temperature-and-humidity-monitoring-system-using-flutter

    An alternative is to make the ESP32 do all the work of hosting a web server, so your mobile device simply accesses the data using a browser:

    https://randomnerdtutorials.com/esp32-web-server-gauges/

    https://www.technolabcreation.com/esp32-weather-station-display-the-sensor-readings-on-a-web-server/

    https://www.electronicwings.com/esp32/analog-gauge-temperature-reading-using-esp32-server

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube