Skip to content

99i/FlameApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 Flame Gate Control System

A beautiful web-based control system for your Flame Gate project with battery monitoring and servo motor control.

📁 Files Overview

  • index.html - Beautiful web interface with battery display
  • web_server.py - Flask web server to control the project
  • run_flame_project.py - Python script to start/stop the FlameOS project
  • temp/FlameOS.py - Your main Raspberry Pi control script (fixed servo motor)
  • FlameAPI.py - Original API (replaced by web interface)

🚀 Quick Start

Option 1: Web Interface (Recommended)

# Install Flask if not installed
pip install flask

# Start the web server
python web_server.py

# Open your browser and go to:
# http://localhost:5000

Option 2: Command Line

# Start the project
python run_flame_project.py start

# Stop the project
python run_flame_project.py stop

# Check status
python run_flame_project.py status

✨ Features

🔋 Battery Monitoring

  • Real-time battery level display
  • Three battery types: Main Power, Backup, Sensor
  • Dynamic battery level simulation
  • Visual battery indicators

🎮 Project Control

  • One-click start/stop button
  • Real-time status updates
  • Beautiful animated interface
  • Error handling and feedback

🔧 Hardware Integration

  • Servo motor control (fixed duty cycle values)
  • LCD display integration
  • Buzzer alerts
  • Serial communication with Raspberry Pi

🎯 How It Works

  1. Web Interface: Open http://localhost:5000 in your browser
  2. Start Project: Click the "Start Project" button
  3. Monitor: Watch battery levels and system status
  4. Control: The servo motor will respond to 'A' signals
  5. Stop: Click "Stop Project" when done

🔧 Technical Details

Servo Motor Fixes

  • Duty Cycle: Changed from 10 to proper values (2.5 for 0°, 7.5 for 90°)
  • Movement: Complete open-close cycle with proper timing
  • Initialization: Servo starts in closed position

Web Interface Features

  • Responsive Design: Works on desktop and mobile
  • Real-time Updates: Battery levels update automatically
  • Status Feedback: Clear indication of system state
  • Error Handling: Graceful error messages

📋 System Requirements

  • Python 3.6+
  • Flask (pip install flask)
  • RPi.GPIO (for Raspberry Pi)
  • Serial communication libraries

🛠️ Troubleshooting

Servo Motor Not Moving

  • ✅ Fixed: Proper duty cycle values (2.5-7.5%)
  • ✅ Fixed: Complete movement sequence
  • ✅ Fixed: Proper initialization

Web Interface Issues

  • Check if Flask is installed: pip install flask
  • Ensure port 5000 is available
  • Check console for error messages

Project Won't Start

  • Verify temp/FlameOS.py exists
  • Check Python dependencies
  • Ensure proper file permissions

🎨 Customization

Battery Levels

Edit the battery levels in index.html:

// Change initial battery levels
<div class="battery-level">85%</div>

Servo Motor Settings

Modify in temp/FlameOS.py:

# Duty cycle values
p.ChangeDutyCycle(2.5)  # 0 degrees (closed)
p.ChangeDutyCycle(7.5)  # 90 degrees (open)

📞 Support

If you encounter issues:

  1. Check the console for error messages
  2. Verify all files are in the correct locations
  3. Ensure Python dependencies are installed
  4. Test the servo motor with the fixed code

🔥 Flame Gate System - Smart, Beautiful, Simple!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors