A simple yet educational IoT web application that allows you to control a physical LED lamp through Bluetooth Low Energy (BLE) communication with an ESP32 microcontroller. Perfect for learning IoT fundamentals!
- Simple Lamp Control: Turn your LED lamp ON/OFF with a single click
- Real-time BLE Communication: Direct communication with ESP32 via Web Bluetooth API
- Visual Feedback: Large circular lamp indicator with customizable colors (Red, Green, Blue)
- Educational Content: Interactive accordion-style learning materials about IoT, BLE, and ESP32
- Modern UI: Clean, responsive interface built with Chakra UI
- Connection Management: Easy ESP32 device discovery and connection
This project helps students understand:
- IoT Fundamentals: What IoT is and how devices communicate
- Bluetooth Low Energy (BLE): Wireless communication for low-power devices
- ESP32 Microcontroller: Hardware platform for IoT projects
- Web-to-Hardware Communication: How web applications can control physical devices
- Real-world Applications: Examples of IoT in various industries
- ESP32 Development Board with BLE capability
- LED and appropriate resistor
- Web browser with Web Bluetooth support (Chrome, Edge, Opera)
- Node.js/Bun for development
- Connect an LED to your ESP32 (typically to GPIO pin with appropriate resistor)
- Upload the smart lamp firmware to your ESP32 with these BLE characteristics:
- Service UUID:
4869e6e5-dec6-4a9d-a0a4-eda6b5448b97 - Control Characteristic UUID:
05c4d03a-ac78-4627-8778-f23fab166ba8
- Service UUID:
- Ensure the ESP32 can receive "1" (ON) and "0" (OFF) commands
-
Clone the repository:
git clone <repository-url> cd fe-activate
-
Install dependencies:
bun install # or npm install -
Start the development server:
bun dev # or npm run dev -
Open your browser and navigate to
http://localhost:5173
- Power on your ESP32 with the smart lamp firmware
- In the web app, go to the Lamp Control tab
- Click "Scan for ESP32 Devices" in the Device Connection section
- Select your ESP32 from the discovered devices
- Wait for the connection to establish
- Once connected, use the large circular lamp indicator to control your LED
- Click the circle or use the "Turn ON/OFF" button
- Select different colors using the color picker (Red, Green, Blue)
- Watch the real-time status updates and connection information
- Switch to the "Learn IoT" tab
- Explore the interactive accordion sections covering:
- What is IoT?
- Bluetooth Low Energy (BLE)
- ESP32 Microcontroller
- Communication Protocols
- Real-world Applications
src/
├── components/
│ ├── LampControl.jsx # Main lamp control interface
│ ├── IoTEducation.jsx # Educational content component
│ ├── DeviceConnection.jsx # BLE device connection management
│ ├── BLEDeviceManager.jsx # BLE device manager (reused)
│ ├── BLEDeviceScanner.jsx # BLE device scanner (reused)
│ └── index.js # Component exports
├── hooks/
│ └── useBLE.js # BLE communication hook (reused)
├── App.jsx # Main application component
├── main.jsx # Application entry point
└── theme.js # Chakra UI theme configuration
- React 19 - Frontend framework
- Chakra UI - Component library and styling
- Web Bluetooth API - Browser-based BLE communication
- Vite - Build tool and development server
- JavaScript/JSX - Programming language
This project is specifically designed for educational purposes and is perfect for:
- IoT Workshops - Hands-on learning experience
- Computer Science Students - Understanding hardware-software integration
- Engineering Courses - Practical application of communication protocols
- Maker Spaces - Simple project for beginners
- STEM Education - Interactive learning about modern technology
- Web Application: Provides user interface for lamp control
- Web Bluetooth API: Establishes connection with ESP32
- BLE Communication: Sends commands ("1" or "0") to ESP32
- ESP32 Processing: Receives commands and controls LED
- Physical Output: LED turns ON/OFF based on web commands
Web Bluetooth is supported in:
- ✅ Chrome (Desktop & Mobile)
- ✅ Edge (Chromium-based)
- ✅ Opera
- ❌ Firefox (not supported)
- ❌ Safari (not supported)
This project is designed for educational use. Feel free to:
- Add new features (brightness control, color changing, etc.)
- Improve the educational content
- Enhance the user interface
- Add more IoT examples
This project is open source and available under the MIT License.
Built with ❤️ for IoT Education at University of Minnesota & ACES
Perfect for teaching the next generation about IoT and smart device development! 🚀