SafeCycle is a revolutionary application designed to enhance bicycle safety through real-time proximity detection. This project was submitted for WallyHacks 2025.
SafeCycle aims to provide cyclists with real-time data on their surroundings, helping them stay safe on the road. The application collects sensor data, processes it, and displays it on a live dashboard. It also provides audio and visual alerts when obstacles are detected within unsafe distances.
- Real-time proximity detection using ultrasonic sensors
- Live dashboard for monitoring sensor data
- WebSocket integration for real-time updates
- REST API for accessing sensor data
- Audio and LED alerts for distance-based warnings
- Moving average filter for smoother sensor readings
To get started with SafeCycle, follow these steps:
git clone https://github.com/yourusername/SafeCycle.git
cd SafeCyclepip install -r requirements.txt # For backend
npm install # For frontendpython manage.py migrate # If using Djangopython manage.py runservernpm startAccess the dashboard at http://localhost:8000
To use SafeCycle, ensure your hardware setup is connected and running. Open the web dashboard to monitor sensor readings in real-time. Alerts will trigger based on detected distances.
- URL:
/api/latest/ - Method:
GET - Description: Retrieves the latest 10 sensor readings.
- URL:
/api/sensor-readings/ - Method:
POST - Description: Creates a new sensor reading.
- Body Example:
{
"left_distance": 25.5,
"right_distance": 30.2,
"back_distance": 15.7,
"timestamp": "2025-03-15T12:00:00Z",
"alert_level": "low",
"device_id": "device123"
}- URL:
/api/sensor-readings/ - Method:
GET - Description: Retrieves all sensor readings.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-name). - Commit your changes (
git commit -m "Add feature"). - Push to your fork and submit a pull request.
This project is licensed under the MIT License. See LICENSE for details.