Skip to content

Repository files navigation

Flutter & Arduino Integrated Demo

Project Overview

This repository demonstrates a simple Arduino project that toggles an LED on pin 13 using a push‑button on pin 2. The Arduino sketch lives in the arduino/ folder. Additionally, the repository includes a Flutter mobile app that communicates with the Arduino over Bluetooth to display and control the LED state.


Technologies Used

Layer Technology Why It’s Chosen
UI Flutter (v3.x) Single code‑base for iOS, Android, and desktop; fast hot‑reload; expressive widget library.
Language Dart Ahead‑of‑time compiled, strong typing, easy interop with platform channels.
Communication Bluetooth Low Energy (BLE) via flutter_blue (or Serial over USB using usb_serial) Low‑latency, wireless control of Arduino peripherals.
Firmware Arduino IDE (C/C++) Direct hardware access; extensive library ecosystem.
Build System Flutter CLI (flutter run, flutter build apk) Simple, reproducible builds.

Repository Structure

├─ arduino/                # Arduino sketch and wiring guide (unchanged)
│   ├─ src/               # .ino files
│   └─ README.md          # Optional Arduino‑specific notes
├─ lib/                    # Flutter source code (Dart)
│   └─ main.dart          # Entry point & UI implementation
├─ pubspec.yaml            # Flutter dependencies
└─ README.md               # (this file)

Arduino Code (Existing)

All Arduino source files are located in the arduino/ folder. Open them directly in the Arduino IDE:

  1. Open arduino/src/<your_sketch>.ino.
  2. Verify board/port settings.
  3. Click Upload to flash the firmware.

Note: The sketch already implements a simple BLE UART service that receives commands (LED_ON, LED_OFF, etc.) from the Flutter app.


Flutter App Setup

Prerequisites

  • Flutter SDK (≥3.0) installed and added to PATH.
  • Android Studio / Xcode (for device emulation) or a physical device.
  • Bluetooth permissions set in android/app/src/main/AndroidManifest.xml and Info.plist for iOS.

Build & Run

# Get dependencies
flutter pub get

# Run on a connected device (Android / iOS)
flutter run

The app displays a Toggle LED button. When pressed, it sends the appropriate BLE command to the Arduino. The UI updates in real‑time thanks to Flutter's reactive framework.


Usage Instructions

  1. Flash the Arduino using the steps above.
  2. Start the Flutter app on your phone or emulator.
  3. Pair with the Arduino (it appears as a BLE device named "Arduino_LED"). The app automatically scans and connects.
  4. Press Toggle LED – the LED on the Arduino board will turn on/off.

Extending the Project

  • Add more sensors (e.g., temperature, distance) and expose new BLE commands.
  • Expand the Flutter UI with charts, settings screens, or multi‑device management.
  • Replace BLE with Wi‑Fi (using ESP‑8266/ESP‑32) and adjust the Flutter side to use TCP sockets.

License

This project is released under the MIT License. Feel free to modify, distribute, and use it in personal or commercial projects.


Generated by Antigravity AI

About

Android application developed with Flutter to help blind people with daily activities using Braille keys

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages