Skip to content

🎨 Custom React Native LED Controller App for BJ_LED_M Bluetooth devices. Features RGB color control, brightness adjustment, 18 preset colors, and audio-reactive lighting modes. Perfect for controlling LED strips and decorative lighting.

Notifications You must be signed in to change notification settings

SidmoGoesBrrr/led-controller-app

Repository files navigation

🎨 LED Controller App

A custom React Native mobile app for controlling BJ_LED_M Bluetooth LED devices. Features intuitive RGB color control, brightness adjustment, preset colors, and audio-reactive lighting modes.

React Native TypeScript Bluetooth iOS Android

✨ Features

πŸ”— Bluetooth Connectivity

  • Automatic discovery of BJ_LED_M devices
  • Persistent BLE connections with connection pooling
  • Multi-device support - control multiple LED strips simultaneously
  • Robust error handling and connection recovery

🎨 Advanced Color Control

  • Brightness Control: Dedicated brightness slider with real-time feedback
  • RGB Sliders: Precise red, green, and blue color adjustment
  • 18 Preset Colors: Quick access to popular colors including:
    • Primary colors (Red, Green, Blue)
    • Secondary colors (Yellow, Cyan, Magenta)
    • Custom colors (Coral, Violet, Turquoise, Gold, etc.)
  • Live Preview: Real-time color preview with brightness visualization

🎡 Audio-Reactive Mode

  • Mic Mode: Transform your LEDs into audio-reactive lighting
  • Multiple Color Patterns: Rainbow, Bass, and Energy modes
  • Sensitivity Controls: Adjustable audio sensitivity (Low/Med/High)
  • Max Brightness Limiting: Control maximum brightness for audio mode

πŸ“± User Experience

  • Clean, modern dark theme interface
  • Intuitive tab-based navigation (Devices, Control, Mic)
  • Real-time device status and connection feedback
  • Optimized for both iOS and Android

πŸš€ Quick Start

Prerequisites

Make sure you have completed the React Native Environment Setup guide.

Installation

  1. Clone the repository

    git clone https://github.com/SidmoGoesBrrr/led-controller-app.git
    cd led-controller-app
  2. Install dependencies

    npm install
  3. iOS Setup (iOS only)

    cd ios
    bundle install
    bundle exec pod install
    cd ..
  4. Start Metro server

    npm start
  5. Run the app

    For Android:

    npm run android

    For iOS:

    npm run ios

πŸ”§ How to Use

1. Device Setup

  • Navigate to the "Devices" tab
  • Tap "Start Scan" to discover nearby BJ_LED_M devices
  • Select your LED devices from the list
  • Multiple devices can be selected for synchronized control

2. Color Control

  • Switch to the "Control" tab
  • Use the Brightness slider to adjust overall brightness (0-255)
  • Fine-tune colors with individual RGB sliders
  • Tap any preset color for instant color changes
  • Live preview shows your selected color and brightness

3. Audio-Reactive Mode

  • Go to the "Mic" tab
  • Tap the microphone button to start audio listening
  • Choose from different color modes:
    • 🌈 Rainbow: Cycles through full color spectrum
    • πŸ”₯ Bass: Red/orange colors for bass-heavy music
    • ⚑ Energy: Blue/white for high-energy sounds
  • Adjust sensitivity and maximum brightness as needed

πŸ›  Technical Details

Architecture

  • React Native 0.81.1 with TypeScript
  • Bluetooth Low Energy (BLE) via react-native-ble-plx
  • Persistent Connection Management with connection pooling
  • Sequential Command Processing to prevent BLE interference
  • MTU Optimization for better data transmission

BLE Communication

  • Service discovery and characteristic caching
  • Custom command protocol for BJ_LED_M devices
  • Command format: [0x69, 0x96, 0x05, 0x02, R, G, B, Brightness]
  • Automatic connection recovery and error handling

Performance Features

  • Connection pooling for multiple devices
  • Characteristic caching to avoid repeated service discovery
  • Sequential command processing to prevent conflicts
  • Optimized timeout handling (10s connection, 100ms command delay)

🎯 Supported Devices

This app is specifically designed for BJ_LED_M Bluetooth LED controllers. These devices typically control:

  • LED light strips
  • RGB LED panels
  • Decorative LED fixtures
  • Custom LED installations

πŸ”§ Development

Project Structure

src/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ColorPicker.tsx    # RGB control and presets
β”‚   β”œβ”€β”€ DeviceList.tsx     # BLE device discovery
β”‚   └── MicMode.tsx        # Audio-reactive mode
β”œβ”€β”€ services/
β”‚   └── BLEService.ts      # Bluetooth communication
└── App.tsx                # Main navigation

Key Dependencies

  • react-native-ble-plx - Bluetooth Low Energy
  • @react-native-community/slider - UI sliders
  • react-native-safe-area-context - Safe area handling
  • @react-native-async-storage/async-storage - Data persistence

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“± Screenshots

Coming soon - screenshots of the app in action

πŸ› Troubleshooting

Common Issues

BLE Connection Failed

  • Ensure your LED device is powered on and in pairing mode
  • Check that Bluetooth permissions are granted
  • Try restarting the app and rescanning

Commands Not Reaching LEDs

  • Verify device selection in the Devices tab
  • Check Bluetooth connection stability
  • Ensure the LED device is within range

Audio Mode Not Working

  • Grant microphone permissions when prompted
  • Check device volume and microphone functionality
  • Try adjusting sensitivity settings

Debug Mode

Enable console logging to see detailed BLE communication:

  • Open React Native debugger
  • Monitor console for connection and command logs

πŸ“„ License

This project is open source and available under the MIT License.

πŸ™ Acknowledgments


🎨 Transform your space with custom LED lighting! 🎨

Made with ❀️ using React Native

About

🎨 Custom React Native LED Controller App for BJ_LED_M Bluetooth devices. Features RGB color control, brightness adjustment, 18 preset colors, and audio-reactive lighting modes. Perfect for controlling LED strips and decorative lighting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •